|
-
May 29th, 2012, 11:46 AM
#1
Thread Starter
New Member
Import Windows Registry
I would like to disable Java update on several PC.
Below is the windows registry command but I would like to have it in a vbscript.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy]
"EnableJavaUpdate"=dword:00000000
Thanks
-
May 29th, 2012, 12:07 PM
#2
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
-
May 29th, 2012, 12:14 PM
#3
Thread Starter
New Member
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
-
May 29th, 2012, 12:20 PM
#4
Thread Starter
New Member
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|