91
edits
Changes
Java
,→Install 32- and 64-bit JRE, remove all other versions using PowerShell: update to 8u65 and deal with javaws/jp2launcher problem; also dealt with LocalLow rename
This package contains an optional hack to fix installation problems sometimes seen with Java 7: It can use [[7-Zip]] to unpack <code>core.zip</code> if the installer didn't. I have not yet seen this problem with Java 8, so it's possible that this is an unnecessary precaution. If you want to use this, uncomment the first half of Step 4 and ensure that [[7-Zip]] is available at your site.
This package contains a workaround the a problem where javaws.exe and jp2launcher.exe are launched multiple times during a silent installation and never exit, blocking the Java install and breaking all other installs done (by WPKG or other programs) until the computer is restarted or someone kills them by hand.
====Instructions & package====
2: While logged on as an administrator, run the installers. When you get
to the "Welcome to Java" dialog, click Cancel.
3: Navigate to %APPDATA%\..\LocalLow\SunOracle\Java
4: Grab the folders (e.g. jre1.8.0_45 and jre1.8.0_45_x64) that the Java
installer left there and move them to %SOFTWARE%\java\
<!-- <variable name="updatever" value="08" /> -->
<variable name="shortupdatever" value="4565" />
<variable name="version" value="8.0.%shortupdatever%" />
<!-- STEP 1: Kill process that may interfere with upgrade -->
<!-- <install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe'> DO NOT BLINDLY REMOVE " AND CONVERT TO SINGLE QUOTES! YOU WILL BREAK THIS! -->
<install cmd='taskkill /f /im jqs.exe'>
<exit code='any' />
</install>
<install cmd="powershell -executionpolicy bypass -noprofile -command "start-process -nonewwindow powershell.exe -argumentlist '-executionpolicy bypass -noprofile -command ""do {get-process javaws,jp2launcher -erroraction silentlycontinue | stop-process; sleep -milliseconds 250} while (get-process cscript -erroraction silentlycontinue) #javakiller""'"" >
<exit code='any' />
</install>
<!-- STEP 3: install -->
<!-- STEP 3.1 install 32-bit -->
<install cmd='msiexec /i %SOFTWARE%\java\jre1.8.0_%shortupdatever%\jre1.8.0_%shortupdatever%.msi JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q' />
<!-- STEP 3.2 install 64-bit -->
<install architecture="x64" cmd='msiexec /i %SOFTWARE%\java\jre1.8.0_%shortupdatever%_x64\jre1.8.0_%shortupdatever%.msi JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q' />
<install cmd='REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f'>
<exit code='any' />
</install>
<!-- stop our javaws killer without affecting other powershell processes -->
<!-- have to use WMI methods because get-process doesn't see command lines -->
<install cmd="powershell -executionpolicy bypass -noprofile -command "get-wmiobject win32_process -filter """"name like 'powershell.exe' and commandline like '% #javakiller%'"""" | % {invoke-wmimethod -name terminate -inputobject $_|out-null}"" >
<exit code="any" />
</install>