vbs:disablejavaupdate
This is an old revision of the document!
Table of Contents
VBS: DisableJavaUpdate
Fare riferimento all'articolo sul blog: http://wp.me/pdQ5q-4mQ
Disabilitare Java Update (LOCAL)
Vi basterà salvare ed eseguire questo file sul vostro PC o portarlo comodamente in chiave USB ed eseguirlo ovunque vogliate (a patto di avere i permessi di modificare il registro di sistema, occorrerà quindi essere amministratori locali della macchina).
- JavaUpdateDisabler.vbs
'JAVA Update Disabler (LOCAL) 'GSolone 2013 ' Set WshShell = CreateObject( "WScript.Shell" ) Set Shell = CreateObject( "WScript.Shell" ) Shell.RegWrite "HKLM\SOFTWARE\JavaSoft\Java Update\Policy\EnableJavaUpdate", 0, "REG_DWORD" 'DEBUG LETTURA NUOVO VALORE 'a = WshShell.RegRead ( "HKLM\SOFTWARE\JavaSoft\Java Update\Policy\EnableJavaUpdate" ) 'Wscript.Echo "JavaUpdate value is ",a, " (0 disabled, 1 enabled)."
Disabilitare Java Update (REMOTE)
Vi basterà salvare ed eseguire questo file sul vostro PC (anche questo è portable, giusto per informazione), specificare il nome della macchina di destinazione e attendere che l'operazione termini. L'utente che lancia lo script deve essere amministratore della macchina remota (quindi occhio alle credenziali con le quali siete collegati alla macchina locale).
- JavaUpdateRemoteDisabler.vbs
'JAVA Update Remote Disabler '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
vbs/disablejavaupdate.1379002343.txt.gz · Last modified: 2013/09/12 18:12 by gfsadministrator