Changes

Jump to: navigation, search

Java

1,336 bytes added, 00:49, 26 November 2015
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 &quot; 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 &quot;start-process -nonewwindow powershell.exe -argumentlist '-executionpolicy bypass -noprofile -command &quot;&quot;do {get-process javaws,jp2launcher -erroraction silentlycontinue | stop-process; sleep -milliseconds 250} while (get-process cscript -erroraction silentlycontinue) #javakiller&quot;&quot;'&quot;" >
<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 &quot;get-wmiobject win32_process -filter &quot;&quot;&quot;&quot;name like 'powershell.exe' and commandline like '% #javakiller%'&quot;&quot;&quot;&quot; | % {invoke-wmimethod -name terminate -inputobject $_|out-null}&quot;" >
<exit code="any" />
</install>
91
edits

Navigation menu