Skip to content

Instantly share code, notes, and snippets.

@gioxx
Created July 17, 2014 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gioxx/963c6cb54fe7a6ada6ec to your computer and use it in GitHub Desktop.
Save gioxx/963c6cb54fe7a6ada6ec to your computer and use it in GitHub Desktop.
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