WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: ed.lowe on November 12, 2013, 02:00:49 PM

Title: HKEY_CURRENT_USER want to use winbatch to run *.reg file
Post by: ed.lowe on November 12, 2013, 02:00:49 PM
I have a registry dump to go into the HKEY_CURRENT_USER area of a bunch of computers (Win 7) as a regular user, the dump is fine the way it is in the *.reg file. What is the easiest way to code a WBT program to load the REG file at the correct time in the program and ok the dialogs?
Sample code would be VERY appreciated, i am somewhat of a new user.

Thanks
Ed
Title: Re: HKEY_CURRENT_USER want to use winbatch to run *.reg file
Post by: Deana on November 12, 2013, 02:49:03 PM
Depending on the registry keys you might need administrative account to handle this. You also may want to run this script as 64-bit.

Regedit.exe supports a /s command-line switch to not display these messages. For example, to silently run the .reg file (with the /s switch) from a login script, use the following syntax:

Code (winbatch) Select

Run('regedit.exe', '/s "c:\path\of \my.reg"')


Use at your own risk. Always make sure to keep backups of the registry.

Reference: http://support.microsoft.com/kb/310516