4 replies
by jhazard112 Accepted solution
by brenton keegan Accepted solution
I'd use vbscript.
the WScript.shell object has the methods you need. You can either use the "write" method to write the actual reg values or you can use the "run" method to run the regedit program and have it merge in a .reg file
your code should look something like this:
Dim WSHShell 'Variable declaration
Set WSHShell = WScript.CreateObject("WScript.Shell") 'set variable = to wscript.shell object
This bit will run a reg file
WshShell.Run "regedit /s " & """" & (reg file path) &""""
This bit will write a specified value:
WshShell.RegWrite (key location), (value), (type)
Things in the parenthesis are things you need to define.
by jhazard112 Accepted solution
by brenton keegan Accepted solution
The particular change you want to make requires a registry change. I know, I've had to change that value network wide myself.
It requires a reg change in XP/2k3 environments anyway.
by the way, if you need to use a batch file and can't use a .vbs file for some reason. You'd issue this command:
regedit /s (reg file location)
you'll notice it's the same as the wshell.run command because essentially that's what that method is doing.
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending