Discussion Locked

Distributing registry edits

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm looking for information regarding the creation of .reg files. In particular pushing out registry edits to a large number of systems via a file run by logon script. Does anybody know of a good source?

2 replies

by roys

There is a way of importing registry entries using Regedit.exe from the command line. This could be included in the login script.

How can I use Regedit to export a registry key from the command line?

Regedit support a /e command line switch.
To export and .Reg file from the command line or batch script, use the following syntax:

regedit /e \Folder\FileName.reg KeyName

Example: To export HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer, use:

regedit /e c:\zzz\reg.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer"

NOTE: Quote marks are required due to spaces in the key name.

To import the file, the command is Regedit \Folder\FileName.reg /s (/s to stop the confirmation request)

Regards,

Roy Streeter

by ngunity

Just a quick correction

I was happy to read the solutions mentioned in this discussion before, until I tried using the '/s' switch to import Registry keys silently with no luck.

After trial & error I found you need to put the '/s' directly after 'regedit'. I.E. : "regedit /s c:\windows\key.reg"

This is obviously important to get right if you want to import keys in logon scripts.

Note this worked under Win95

This discussion is closed to new replies.