Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update Windows registry value with batch file? 1

Status
Not open for further replies.

grofaty

IS-IT--Management
Jan 16, 2003
370
SI
Hi,

how to write a windows batch file to update windows registry value?

I need to update some registry values at regular time period. I would like to schedule the batch file, but don't know how to update registry.

Thanks,
Grofaty
 
grofaty,

Can I impose on you to provide a bit more detail on specifically what it is you are trying to accomplish.

The registry is a DB & I can think of no instance where it's values?? would need scheduled refreshing.

caveat:
Before doing any registry work one should ALWAYS!! Back it up first. Reason: if it becomes corrupted and there is no backup, you are left with an re-installation.

Please post back with additional detail.


rvnguy
"I know everything..I just can't remember it all
 
Make sure the registry key is exactly how you want to be and then export the key only to a .reg file.

Create a batch file similar to the following:

echo off
regedit /s "{location of reg file\regfile.reg"
exit

Then create a schedule to run the batch file at the specified time. Make sure the user has a local administrator account.

The /s switch makes the batch file run silently.
 
Thanks to both of you. I tried out the tony72000 option and it works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top