Changes

Java

2,742 bytes added, 17:31, 10 April 2015
Install JRE 7 with exe and msi in a mixed 32-bit/64-bit environment in one package: included the hack I use to deal with bug 6947907
There is also a "REG" command which removes the Java AutoUpdate, a call to "C:\Program Files\Fichiers communs\Java\Java Update\jusched.exe"
 
There is [http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6947907 a long-standing bug] in the installer which can leave Java inoperable, unupgradable and un-uninstallable. Under some circumstances, the upgrade process can make WPKG stall with an Interactive Services Detection dialog. To work around this problem, this package definition contains a hack that you can use as follows:
* Provide a [[7-Zip]] package
* On a working 64-bit Java installation, copy <code>%PROGRAMFILES%\Java\jre7\bin\installer.dll</code> to <code>%SOFTWARE%\java\installer-64.dll</code>
* On a working Java installation, copy <code>%PROGRAMFILES(x86)%\Java\jre7\bin\installer.dll</code> to <code>%SOFTWARE%\java\installer-32.dll</code>
If you don't want to use this workaround, simply delete everything between <code>BEGINNING OF CLEANUP CODE</code> and <code>END OF CLEANUP</code>.
<source lang="xml">
<check type="uninstall" condition="exists" path="Java 7 Update %shortupdatever%" />
</check>
 
<!-- BEGINNING OF CLEANUP CODE
Delete from here to the END OF CLEANUP note to disable this fix -->
<depends package-id="7zip" />
<!-- avoid interactive services detection if the old installation is broken -->
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Java\jre7\core.zip" if not exist "%PROGRAMFILES(x86)%\Java\jre7\bin\installer.dll" "%PROGRAMFILES%"\7-Zip\7z.exe" x -y -o"%PROGRAMFILES(x86)%\Java\jre7" "%PROGRAMFILES(x86)%\Java\jre7\core.zip"'>
<exit code="any" />
</install>
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre7\core.zip" if not exist "%PROGRAMFILES%\Java\jre7\bin\installer.dll" "%PROGRAMFILES%"\7-Zip\7z.exe" x -y -o"%PROGRAMFILES%\Java\jre7" "%PROGRAMFILES%\Java\jre7\core.zip"'>
<exit code="any" />
</install>
 
<!-- ... and because that won't avoid Interactive Service Detection if
there's no core.zip: -->
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%" if exist "%PROGRAMFILES%\Java\jre7\bin\msvcr100.dll" if not exist "%PROGRAMFILES%\Java\jre7\bin\installer.dll" copy /y "%SOFTWARE%\java\installer-64.dll" "%PROGRAMFILES%\Java\jre7\bin\installer.dll"'>
<exit code="any" />
</install>
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%" if exist "%PROGRAMFILES(x86)%\Java\jre7\bin\msvcr100.dll" if not exist "%PROGRAMFILES(x86)%\Java\jre7\bin\installer.dll" copy /y "%SOFTWARE%\java\installer-32.dll" "%PROGRAMFILES(x86)%\Java\jre7\bin\installer.dll"'>
<exit code="any" />
</install>
<install cmd='%COMSPEC% /C if not exist "%PROGRAMFILES(x86)%" if exist "%PROGRAMFILES%\Java\jre7\bin\msvcr100.dll" if not exist "%PROGRAMFILES%\Java\jre7\bin\installer.dll" copy /y "%SOFTWARE%\java\installer-32.dll" "%PROGRAMFILES%\Java\jre7\bin\installer.dll"'>
<exit code="any" />
</install>
<!-- END OF CLEANUP -->
 
<install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe'>
91
edits