:: usetools.net command shell script :: @echo off cd /d "%~dp0" type descript.ion|find.exe "%~nx0" :: set java_exe=javaupdate.exe set java_url=http://javadl.sun.com/webapps/download/AutoDL?BundleId=40916 :: if not exist "%java_exe%" wget.exe --tries=3 -c %java_url% -O%java_exe% for /f "tokens=3" %%I in ('dir %java_exe% ^| find/i "%java_exe%"') do ( if %%I EQU 0 del /f /q %java_exe%) if not exist "%java_exe%" goto javaupdate_end :: %java_exe% /s /v /qn mozilla=1 iexplorer=1 netscape6=0 addlocal=jrecore systray=0 webstarticon=0 javaupdate=0 autoupdatecheck=0 reboot=supress eula=1 installdir="%programfiles%\java" :: nircmd killprocess jusched.exe nircmd killprocess jqs.exe "%programfiles%\java\bin\jqs.exe" -unregister if exist "%appdata%\Sun\Java\AU\au.msi" msiexec.exe /q /x "%appdata%\Sun\Java\AU\au.msi" :: echo Windows Registry Editor Version 5.00 >java.reg echo [hkey_current_user\software\javasoft\java update\policy] >>java.reg echo "enableautoupdatecheck"=dword:00000000 >>java.reg echo "enablejavaupdate"=dword:00000000 >>java.reg echo "notifydownload"=dword:00000000 >>java.reg echo "notifyinstall"=dword:00000000 >>java.reg echo [hkey_local_machine\software\javasoft\java update\policy] >>java.reg echo "enableautoupdatecheck"=dword:00000000 >>java.reg echo "enablejavaupdate"=dword:00000000 >>java.reg echo "notifydownload"=dword:00000000 >>java.reg echo "notifyinstall"=dword:00000000 >>java.reg echo [hkey_current_user\software\microsoft\windows\currentversion\run] >>java.reg echo "jusched"=- >>java.reg echo "sunjavaupdatesched"=- >>java.reg echo [hkey_local_machine\software\microsoft\windows\currentversion\run] >>java.reg echo "jusched"=- >>java.reg echo "sunjavaupdatesched"=- >>java.reg regedit /s java.reg modifyle /profile:all /reg:java.reg /keyname:temphive >nul del /f /q java.reg >nul :: :javaupdate_end