Tom's Guide | Tom's Hardware | Tom's Games | PC Safety Suite
![]() |
![]() |
![]() |
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\ParametersYour help is greatly appreciated.
+1 | ![]() |
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
![]() |
Little help?
|
Help With C
|

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