Update JAVA with script
taskkill /F /IM iexplorer.exe
taskkill /F /IM iexplore.exe
taskkill /F /IM firefox.exe
taskkill /F /IM chrome.exe
taskkill /F /IM javaw.exe
taskkill /F /IM jqs.exe
taskkill /F /IM jusched.exe
wmic product where “name like ‘Java%%'” call uninstall /nointeractive
msiexec.exe /i \\Fileserver\jre-7u11\jre1.7.0_11.msi /qn
Explanation:
First. Kill all the processes needed to install java
vmic search after “Java * ” in “add-remove” programs.
If something starts with “Java”, it will be removed.
Last. Do a silent install
You need the two files in the folder where java is installed from:
Data1.cab
jre1.7.0_11.msi
If you start up the java install double clicking “jre-7u11-windows-i586.exe”, they can be found in:
C:\Users\user\AppData\LocalLow\Sun\Java\jre1.7.0_11
———————————–
What version of Java is installed and do somethig based on that:
IF (@PRODUCTTYPE) = “Windows 7 Professional Edition”
? “Windows 7”
$FileVersionWin7 = GetFileVersion(“C:\Program Files (x86)\Java\jre7\bin\java.exe”)
IF $FileVersionWin7 >= “7.0.150.3”
? “Java: ” + $FileVersionWin7 + ” No update”
else
? “Java: ” + $FileVersionWin7 + “Update”
RUN “\\nas\Java\jre-7u15\update.cmd”
endif
? “…”
EndIF
IF (@PRODUCTTYPE) = “Windows XP Professional”
? “Windows XP”
$FileVersionXP = GetFileVersion(“C:\Programs\Java\jre7\bin\java.exe”)
IF $FileVersionXP >= “7.0.150.3”
? “Java: ” + $FileVersionXP + ” No update”
else
? “Java: ” + $FileVersionXP + ” Update”
RUN “\\nas\Java\jre-7u15\update.cmd”
endif