Created
July 17, 2014 08:42
-
-
Save gioxx/963c6cb54fe7a6ada6ec to your computer and use it in GitHub Desktop.
JAVA Update Remote Disabler (x86)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'JAVA Update Remote Disabler (x86) | |
'GSolone 2013 | |
' | |
Const HKEY_CURRENT_USER = &H80000001 | |
Const HKEY_LOCAL_MACHINE = &H80000002 | |
Set WSHShell = WScript.CreateObject("WScript.Shell") | |
Set WNetwork = Wscript.CreateObject("Wscript.Network") | |
On Error Resume Next | |
'Query for target PC | |
strComputer = InputBox("Hostname macchina di destinazione", "JavaUpdateDisabler", WNetwork.ComputerName) | |
If strComputer = "" Then Wscript.Quit | |
'strComputer = Ucase(strComputer) | |
Set StdOut = WScript.StdOut | |
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") | |
strKeyPath = "SOFTWARE\JavaSoft\Java Update\Policy" | |
strValueName = "EnableJavaUpdate" | |
dwValue = 0 | |
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment