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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running regedit from a *.bat or *.cmd File 1

Status
Not open for further replies.

NTman2000

MIS
Sep 26, 2006
15
0
0
GB
Has anyone done this ? what I am trying to do is automate the regedt32 /s Registry.reg command from within a batch or cms file this will work if you run it from a command prompt but not the batch file

Anybody any ideas?

Thanks
 
What if you use regedit instead of regedt32? I'm pretty sure that I have done this successfully in the past with regedit.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I use this one every time I boot my machine.

next few lines are the bat file
___________________________________________________________
echo off
cls
rem Note: this file merges tif-cln.reg to re-establish the RunOnce value
start /w regedit.exe /s tif-cln.reg
exit
___________________________________________________________
The next lines arethe tif-cln.reg file
___________________________________________________________
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce]
"TIF-Clean"="TIF-CLN.BAT"
____________________________________________________________

 
Thanks for that in the end my solution was as follows:

regedit -s "\\Servername\Netlogon\filename.reg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top