Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the best way to deploy a HKCU registry change for anyone who logs onto the machine. Someone mentioned to me Active Setup...but I am not sure.

share|improve this question
    
Active Setup is really the way to go: serverfault.com/questions/11253/… –  Glytzhkof Sep 18 '09 at 11:06
add comment

4 Answers

Are you using Active Directory? Then you can use a Group Policy to change / add / remove Registry Settings for every user which logs onto a machine in the domain.

If you cant use GPO maybe a shortcut to a script which sets the values in C:\Documents and Settings\All Users\Start Menu\Programs\Startup can help you.

share|improve this answer
    
How can one use a Group Policy to add/change/remove registry settings for every user which logs onto a machine in the domain? –  Ian Boyd Aug 24 '10 at 15:04
    
Hi Ian You need to create a script (batch, vbs...) which will to the changed and include the script in the Logon - Scripts of the GPO (User Configuration -> Windows Settings -> Scripts) –  grub Aug 30 '10 at 11:12
add comment

This depends on what kind of network you're running.

On a single machine (which seems may be your case) you can create a profile (non-administrator) and set everything up the way you want it there. Then log off, log on as an administrator, and copy that profile to the Default User profile. To copy, right click My Computer, and select properties. Go to the Advanced Tab, User Profiles > Settings... From there, click on the profile you configured, and select Copy To. Browse to your Documents and Settings Folder, and Select Default User. Overwrite anything there. When a new user logs in, the settings you just set up will be copied to their new profile.

As stated before, you can apply a Group Policy, which will affect users while they're logged on if you're running Active Directory. Group Policy goes a step further and enforces the rules you put in it (users can't change the settings you dictate here.)

If you have a small network, you can use a tool such as PSExec and remotely execute applications on a remote machine, including a batch file that has the registry settings in it. See http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx for more info. Also, if you edit the registry itself, instead of editing, HKCU, edit HKEY_USERS, and select the .Default subkey, and place the settings in there.

share|improve this answer
add comment

Registry settings can also be put in an MSI (which can be built using Visual Studio, WinInstall LE or some other MSI authoring tool) and deployed via a GPO. Also handy for offline folks or where you don't have AD as you can just give them the MSI.

share|improve this answer
1  
Hi. Also possible with NSIS (nsis.sourceforge.net/Main_Page) An OpenSource Tool/Language for creating Windows Installers. –  grub Aug 7 '09 at 16:31
add comment

There are several options.

  1. In a single-machine or few-machine scenario, you can use regedit to load the default user registry hive and make the changes there. This is then copied to all new users. I like to leave the default user registry hive alone if I can, though, so I would suggest that you use one of the other alternatives.
  2. Use Group Policy to apply a registry key or value. This may be unreliable over a wide area network if you have not tweaked your Group Policy processing latency.
  3. Use a logon script. You can write a *.cmd script that uses the reg.exe command to make any change you want. Type "reg /?" at a command prompt to see the syntax.

I discourage setting up an existing user profile as desired and then copying it over the default user profile. The shell is a very complicated program, and this copying can have undesired effects. See "Configuring default settings for Windows image deployment" on The Deployment Guys blog for a good discussion of this. Instead, search for user interface text on the web to find where that interface stores its settings in the registry. If you run into one that no one has written about on the web, use Process Monitor to capture everything written into the registry as you change the setting in the user interface. Then you will have the data you need to write your script or define your Group Policy object.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.