64Bit Java Batch File (EXE) Non UAC
Java 8 – x64 Batch File (64-bit)
@ECHO OFF
:: remove current java JRE
START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%6%%Update%%'" call uninstall /nointeractive
START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%7%%Update%%'" call uninstall /nointeractive
START /WAIT /MIN WMIC product where "Name LIKE '%%Java%%8%%Update%%'" call uninstall /nointeractive
:: install 64bit JRE8-upd141
@ECHO OFF
mkdir c:\tmps
xcopy /Y \\192.168.200.46\apps\java\jre-8u141-windows-x64.exe c:\tmps
c:\tmps\jre-8u141-windows-x64.exe /s
rd c:\tmps /S /Q
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::set auto update off
reg QUERY "HKLM\SOFTWARE\JavaSoft\Java Update\Policy"
if %ERRORLEVEL% EQU 0 (
reg ADD "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" ^
/v "EnableJavaUpdate" /t REG_DWORD /d 0 /f
)
exit