Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JAVA Update Remote Disabler (x86)
'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