[wpkg-users] Java 8 on Win64 - the saga continues...
Nils Thiele
it.service.kultur at uni-hamburg.de
Wed Jan 27 10:48:58 CET 2016
Hey,
with the extracted msi i have no problems with java8 anymore, well i
still think you have to completely remove the old version as java8 wont
update the old but besides that its working.
Here is my package:
<package
id="java_re"
name="Java(TM) Runtime Environment"
revision="%version%"
reboot="false"
priority="178"
>
<variable name="updatever" value="72" />
<variable name="shortupdatever" value="72" />
<variable name="version" value="1.8.0_%updatever%" />
<variable name="autoupdate" value="0" />
<check architecture="x86" type="file" condition="exists"
path="%PROGRAMFILES%\Java\jre1.8.0_%updatever%\bin\java.exe" />
<check architecture="x64" type="file" condition="exists"
path="%PROGRAMFILES(X86)%\Java\jre1.8.0_%updatever%\bin\java.exe" />
<check type="logical" condition="or">
<check type="uninstall" condition="exists" path="Java 8 Update
%updatever%" />
<check type="uninstall" condition="exists" path="Java 8 Update
%shortupdatever%" />
</check>
<!-- Remove JRE 7 if still installed before new install -->
<install cmd="%ComSpec% /c for /L %N in (0,1,80) do @msiexec
/passive /x {26A24AE4-039D-4CA4-87B4-2F032170%~NFF} >NUL">
<condition>
<check type="uninstall" condition="exists" path="Java 7.+" />
</condition>
<exit code="any" />
</install>
<!-- Install uptodate JRE -->
<install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im
firefox.exe'>
<exit code='1' />
<exit code='128' />
</install>
<install cmd='msiexec /passive /i
%SOFTWARE%\jre\jre%version%\jre1.8.0_%updatever%.msi REBOOT=Suppress
IEXPLORER=0 MOZILLA=1 JAVAUPDATE=%autoupdate% CUSTOM=1' />
<!-- Disable Auto Update -->
<install cmd='REG DELETE
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched
/f'>
<exit code='any' />
</install>
<upgrade include="remove" />
<upgrade include="install" />
<!-- /passive gives more info than /qn -->
<!-- Removes all possible JRE 8 Version using for loop, >NUL is
necessary to get rid of output -->
<remove cmd="%ComSpec% /c for /L %N in (10,1,%updatever%) do
@msiexec /passive /x {26A24AE4-039D-4CA4-87B4-2F832180%~NF0} >NUL">
<exit code="1605" />
<exit code="0" />
</remove>
<!-- Alternative using wmi
<remove cmd='wmic product where "Name like apos;Java 8%%'"
call uninstall /nointeractive' >
<exit code='any' />
</remove> -->
<!-- Remove Java Folder -->
<remove architecture="x64" cmd='%COMSPEC% /c if exist
"%PROGRAMFILES(X86)%\Java" rmdir /S /Q "%PROGRAMFILES(X86)%\Java"' />
<remove architecture="x86" cmd='%COMSPEC% /c if exist
"%PROGRAMFILES%\Java" rmdir /S /Q "%PROGRAMFILES%\Java"' />
</package>
It includes a removal attempt of java 7 if its still installed and two
methods for removing java8.
This is for java8 x86 on both x86 and x64.
Maybe it helps you.
Greetings,
Nils
Am 26.01.2016 um 22:40 schrieb David Pailler:
> Hi,
> The only way to do it it's again with the extract msi.
> I have tested exactly the same problem with the executable.
> exit code 0 and nothing.
> I think user builtin\system can't create the msi and follow the install.
> Indeed , installation by xml with wpkg lanched by real user works fine
>
> Regards
> Le 26/01/2016 22:06, Frank Morawietz a écrit :
>> Hi,
>>
>> I resumed my fights with the automated installation of Java 32-bit on
>> Windows 64-bit...
>>
>> Now, I am some steps further and got some new insights that I would like
>> to share with you.
>>
>> I found two situations where the installation simply hung:
>>
>> 1. When using PSExec
>> On the very first start, PSExec interactively asks for confirmation of
>> it's license. So, before using PSExec for installation, I had to start
>> it interactively once, so that I could accept the license before using
>> it. For using it in the system context, I had even to start it like
>> this: "PSExec -s -i PSExec".
>>
>> 2. The Java installer dialog
>> The dialog of the Java installer has to be avoided by the appropriate
>> start parameters.
>>
>> This hung situation was bad, because not only the Java installer, but
>> also the WPKG service itself got stock. Especially on Windows 8, WPKG
>> could only get back to work by either manually killing the hanging
>> installation processes or by performing an explicit reboot. Otherwise,
>> it keeps on hanging until the next Windows-update-caused reboot... :-(
>>
>>
>> Then, I finally got the installation working. - At least on Windows 7,
>> 64-bit. I had to start the setup program (jre-8uXX-windows-i586.exe)
>> with "%COMSPEC% /c", otherwise it failed with error code -80. I don't
>> know why it works without for you, Holger. Do you use another
>> installation program?
>>
>> On Windows 8.1, the very same installation commands are still failing.
>> Or better, they succeed, but they only pretend.(!)
>>
>> 2016-01-26 19:38:32, DEBUG : Executing command: '%COMSPEC% /c
>> %SOFTWARE%\jre-%UPDATEVER%u%SHORTUPDATEVER%-windows-i586.exe %PARAM% >>
>> %JAVA_LOG%' ('C:\WINDOWS\system32\cmd.exe /c
>> \\INSTSERV\autoinst\software\jre-8u71-windows-i586.exe INSTALL_SILENT=1
>> STATIC=0 AUTO_UPDATE=0 WEB_ANALYTICS=0 REBOOT=0 NOSTARTMENU=1 SPONSORS=0
>> /L \\INSTSERV\autoinst\logs\PC01-java-update.txt.log >>
>> \\INSTSERV\autoinst\logs\PC01-java-update.txt').
>> 2016-01-26 19:38:41, INFO : Command '%COMSPEC% /c
>> %SOFTWARE%\jre-%UPDATEVER%u%SHORTUPDATEVER%-windows-i586.exe %PARAM% >>
>> %JAVA_LOG%' returned exit code [0]. This exit code indicates success.
>> 2016-01-26 19:38:41, INFO : Command in installation of Java Runtime
>> Environment returned exit code [0]. This exit code indicates success.
>>
>> So, the installation was obviously successful. But nothing got
>> installed! There is no Java installation nor does even the logfile get
>> created.
>>
>> A few lines later, WPKG notices this itself and reports it in the log
>> file:
>>
>> 2016-01-26 19:38:44, ERROR : Could not process (upgrade) Java Runtime
>> Environment.|Failed checking after installation.
>>
>> Has anybody else ever experienced this? Any ideas?
>>
>> All the best,
>> Frank
>
--
IT-Support - Fachbereich 09 Kulturgeschichte und Kulturkunde
Universität Hamburg
Flügelbau West, R. 204
Edmund-Siemers-Allee 1
D-20146 Hamburg
Tel.: +49-40-42838-3024
Email: it.service.kultur at uni-hamburg.de
More information about the wpkg-users
mailing list