Registry changes via script

February 13, 2009 at 07:51:56
Specs: Windows XP, 2.8
Sorry - This may not be possible, but it's worth a shot. I have an application that gets it's configuration info from the users registry hive. I need to make a change to the hive, but multiple users access each machine. Is there a way to make the change as a startup script when each user logs in? It would need to modify the user's \\hkey_user\SID\software\application\string.

See More: Registry changes via script

Report •

February 13, 2009 at 11:20:03

Using regedit, you can manually add the registry entry on a single system and then export that key to a .reg file. For purposes of my example, I'll call it changes.reg. If the key has other entries, simply edit them out of the changes.reg file leaving only the one you added.

Now you have a file containing the change you want.

Add the following line to your script:

regedit /s d:\path\changes.reg

Where d:\path points to the drive and folder containing the changes.reg file if it's located someplace other than the current folder.

The /s parameter suppresses the regedit prompt you would otherwise see asking if you're sure you want to make the change to the registry. You can experiment with the command from the command line with and without the /s to see what I mean.

As always, be careful editing the registry. Change or delete the wrong key and you could end up with a vegetable instead of a working system.

Report •
Related Solutions

Ask Question