We help IT Professionals succeed at work.

Login script for Default user profile in Windows 7

cameron213 asked
Medium Priority
Last Modified: 2012-05-11
I am wanting to create some scripts that will run the first time a new user logs into a domain computer but I am not having any luck doing so. Bascially what I am trying to do is configure a homepage for IE and set some Office 2010 settings by running some scripts when a new user logs in to their machine.

I have tried creating a new key  "hkey_users\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce", adding a new string value called "First Run" and pointed it to the script which I stored for testing purposes in C:\test.

After creating the new key entry I log in as a new domain user and find that the script didn't run, or else it encountered an error. However, I am able to run the script with success if I double click it from within the new user account profile.  

here is an example of the script called "set_homepage.vbs"

Dim ChangeReg
Set ChangeReg = CreateObject("WScript.Shell")
ChangeReg.regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.google.com/", "REG_SZ"

Am I doing something wrong? Are there any other ways to create one time login scripts for the default profile without having to use Group Policy and or running scripts from the DC?

Thanks in advance
Watch Question

I think on eissue is tha tyou need to do it this way: http://support.microsoft.com/kb/284193
It sounds like you added an extra step into it, rather than just pointing it directly to the script.


That actually wont work for Windows 7 as far as I know. The Default profile is already loaded.


I've actually already read both of these articles. What I have is an image that I've created with sysprep. However, there are many settings that are not transfered over during the copyprofile process. I thought I could do this using a login script that runs under the default profile, but I havent found one documented way of doing so using a Windows 7 machine.

You could create the customisations you want on a profile, then copy that up to the netlogon folder and call it 'default user.v2' That will then become your default profile for all the windows 7 and vista machines on your domain.

This explains how to do it http://support.microsoft.com/kb/973289 about half way down the page there's a section called 'How to turn the default user profile into a network default user profile in Windows 7'

The Image information would have been useful. Martin81's link will do the trick for you.


Like I mentioned in my question, I do not want this running from the DC. I have a mixted network of Windows XP machines and Windows 7. We are currently rolling out Windows 7. There should be a way to incorporate a script into the default user profile that will run the commands I need. Its only a few commands...one that sets the IE homepage and a few that set Office 2010 settings.

I've already created a customized OS via sysprep that has a default profile. However, some settings are not retained and this is why I need to run a script.

When you say that the settings are not retained, do you want them permanent? If so you should be using Group Policy's. You can have your XP and Win 7 in different groups easy enough.

Or is it that you just want a Starter Settings that your users can change afterwards?
System Administrator
Unlock this solution and get a sample of our free trial.
(No credit card required)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.