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!

Update the registry from login script silently 1

Status
Not open for further replies.

fitzpatrickjj

IS-IT--Management
Apr 10, 2001
8
0
0
SG
I want to merge a .reg file into the registry each time a PC is booted or when a user logs in using a login script. I can do it in Win98 using the DOS version of regedit and a command in the autoexec.bat. How do I do the same in Windows 2000? This particular key has to be updated before anything else loads.
 
Use autoexec.nt instead.
Pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Try hotfiles.com of a Google search for registry editors. There are a lot of shareware and freeware ones out there.

It certainly does appear that MS has removed the command line interfaces from both Regedit and Regedt32 in Win2k. :-(
Jeff
I haven't lost my mind - I know it's backed up on tape somewhere ....
 
Hello, all.

Correct me if I'm wrong. But, I don't think MS has removed the commandline interface for regedit.exe or regedt32.exe. CLI for them is not all-powerful, but certainly no less than that of win9x.

If you want to do a merge "silently", fitzpatrickjj, you can use the /s switch with no problem. Hence
regedit /s regfile.reg
is still viable.

Now, the timing. If you can make a batch file with the line above and drop a shortcut of the batch file to:
%userprofile%\Start Menu\Programs\Startup
the merge can be executed at the time after logon. Whether it is early enough, I've no idea. If the merge data is user independent, then, I guess appending a line to autoexec.nt might be taken by system fractionally earlier than those in the queue of %userprofile%\...\startup. It depends and might need a bit of experimentation. The ultimate "timing" solution might have to go to registry key Run, RunServices etc and implement the command line on executing the batch file directly as an entry value.

regards - tsuji
 
My mistake - I assumed you were merging a file, but wanting to call it from autoexec.

The regedit /s filename.reg format is the way to go, or use REG from the resource kit.

Good tip, Tsuji.
Pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top