User Tools

Site Tools


vbs:disablejavaupdate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vbs:disablejavaupdate [2013/09/12 18:12] – created gfsadministratorvbs:disablejavaupdate [2014/07/17 10:43] (current) gfsadministrator
Line 7: Line 7:
 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**). 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**).
  
-<file vb JavaUpdateDisabler.vbs> +Vedi https://gist.github.com/gioxx/166afd4e286b30482bf8
-'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)." +
-</file>+
  
 ===== Disabilitare Java Update (REMOTE) ===== ===== Disabilitare Java Update (REMOTE) =====
Line 23: Line 13:
 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). 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).
  
-<file vb JavaUpdateRemoteDisabler.vbs> +Vedi https://gist.github.com/gioxx/963c6cb54fe7a6ada6ec
-'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 +
-</file>+
vbs/disablejavaupdate.txt · Last modified: 2014/07/17 10:43 by gfsadministrator