Computing.Net > Forums > Programming > Script to Modify Registry

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Script to Modify Registry

Reply to Message Icon

Name: Mario
Date: November 8, 2002 at 07:50:53 Pacific
OS: Win2K
CPU/Ram: 1.7Ghz, 512 MB
Comment:

I need to modify the registry of allot of computers here at work, but instead of manually modifying the registy on each one I would rather run a script. Could someone please give me a sample script on how to add an entry into the registy, and I believe I can go from there. I either want to create a bat file or something in Java. Here is what I want to do.

Add a REG_DWORD in
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters

Your help is greatly appreciated.



Sponsored Link
Ads by Google

Response Number 1
Name: Jeff J
Date: November 8, 2002 at 15:33:52 Pacific
Reply:

Adding/modifying by script is fairly easy (removal is slightly more difficult). You could run an .inf file, but a .reg file would be easier. Just put something like this in it:


REGEDIT4

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters]
"NewParamName"=dword:00000001


Although invoking the resulting .reg file from the command line should do the trick (default action is to "merge" the contents into registry), you can also process it directly (or as command in .bat file). Just run:

regedit.exe MyRegFile.reg

Assuming no permission restrictions, should work fine.

Cheers


0

Response Number 2
Name: CyberSlug
Date: November 8, 2002 at 23:00:46 Pacific
Reply:

regedit.exe /s MyRegFile.reg

The /s supresses the confirmation dialog


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Little help? Help With C



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Script to Modify Registry

using a vbs script to add reg value www.computing.net/answers/programming/using-a-vbs-script-to-add-reg-value/15420.html

modify nslookup script to use batch www.computing.net/answers/programming/modify-nslookup-script-to-use-batch/15943.html

script to find path and copy files www.computing.net/answers/programming/script-to-find-path-and-copy-files-/15276.html