Re: Import Windows Registry
Save that key to a file with a .reg extension, then, from each machine, you can run
Code:
Shell "regedit.exe NameOfFileYouCreated.reg /s", vbNormalFocus
Re: Import Windows Registry
Just curious to know is there a way to actually write the command in VB ?
Reason I`m asking is this will travel in several different subnet with another vbs file and I`m afraid if I start using several file one of them may get lost.
If I was able to have it in a vbscript It will be easier to add it to one of the script we have.
THanks
Re: Import Windows Registry
Found what is was looking for ... Thanks
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy"
strValueName = "String Value Name"
strValue = "string value"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "EnableJavaUpdate"
dwValue = 00000000
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue