[wpkg-users] Issues with publishing Java 8u102 over wpkg

Steve Kersley steve.kersley at keble.ox.ac.uk
Mon Sep 12 12:28:45 CEST 2016


Just a guess, but as the SHORTUPDATEVER has rolled over to 3 digits, I assume that the ID generated is wrong.  Try removing the zero from in front of the variable:

<check type="uninstall" condition="exists" path="{26A24AE4-039D-4CA4-87B4-2F83218%shortupdatever%F0}"

For consistency, maybe also pad out PREVSHORTUPDATEVER with a leading zero, same with other uses of 2 digit numbers - although that complicates things as looks as though it needs to be checked without a leading zero in the uninstall string, but used as a 3 figure value with leading zero in the uninstall string.  Not sure if there's a simple way to do that without having to have multiple variables with and without leading zeroes.

That's just a guess though based on it moving from 2 to 3 digit version number.

PS: I really dislike the 'PREVIOUSVERSION' variable way of removing the old package - in our environment it's quite common for some PCs to be off/away for several months - using this model if they miss an update, the next update then doesn't remove the previous previous version as the script only tells it to remove the previous version which was never installed.  With Java, that can be a security concern as the JRE doesn't appear to remove old versions itself, and malicious code in a browser can request older versions of the Java plugin.  Basically, Java versioning is a mess, nothing to do with wpkg :)

From: wpkg-users [mailto:wpkg-users-bounces at lists.wpkg.org] On Behalf Of Mendim Uka
Sent: 12 September 2016 10:34
To: wpkg-users at lists.wpkg.org
Subject: [wpkg-users] Issues with publishing Java 8u102 over wpkg

Dear WPKG Team :)

Ive actually got a problem with publishing the java versuib 8u102.
Actually installed version is: 8u65 which worked perfectly publishing over wpkg.
Now I want to update to 8u102 but it doesn't work using the same script (adjusted to the version 102)

Used Installer Application: jre-8u102-x64.exe (Java Platform SE binary), and jre-8u102-i586.exe (Java Platform SE binary),

Package Script:

<?xml version="1.0" encoding="UTF-8"?>

<packages>

<package
    id="java10"
    name="Java Runtime Environment 8"
    revision="%version%"
    reboot="false">

    <variable name="updatever" value="08" />
    <variable name="shortupdatever" value="102" />
    <variable name="prevshortupdatever" value="65" /> <!--Previous Version-->
    <variable name="version" value="8.0.%shortupdatever%" />

    <check type="logical" condition="or">
        <check type="uninstall" condition="exists" path="Java 8" />
        <check type="uninstall" condition="exists" path="Java 8 Update %shortupdatever%" />
                        <check type="uninstall" condition="exists" path="{26A24AE4-039D-4CA4-87B4-2F832180%shortupdatever%F0}" />
    </check>

    <install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe'>
        <exit code='any' />
    </install>

    <install cmd='msiexec /i %SOFTWARE%\Java\jre1.8.0_%shortupdatever%.msi JU=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 RebootYesNo=No WEB_JAVA=1 /q' >
        <exit code='any' />
    </install>

            <upgrade cmd='msiexec.exe /qn /x {26A24AE4-039D-4CA4-87B4-2F832180%prevshortupdatever%F0}' /> <!--Remove previous Version-->

            <remove cmd='msiexec.exe /qn /x {26A24AE4-039D-4CA4-87B4-2F832180%shortupdatever%F0}' />

 <!-- Remove Java Quick Starter -->
            <install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre1.8.0_%shortupdatever%\bin\jqs.exe" "%PROGRAMFILES%\Java\jre1.8.0_%shortupdatever\bin\jqs.exe" -unregister'>
        <exit code='any' />
    </install>

    <install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Java\jre1.8.0_%shortupdatever%\bin\jqs.exe" "%PROGRAMFILES(x86)%\Java\jre1.8.0_%shortupdatever\bin\jqs.exe" -unregister'>
        <exit code='any' />
    </install>

 <!-- Remove Java Auto Update -->
            <install cmd='REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f'>
        <exit code='any' />
    </install>

    <downgrade include="install" />

    <upgrade architecture="x64" cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F864180%prevshortupdatever%F0}' /> <!--Remove previous Version-->
    <upgrade include="install" />

    <remove architecture="x64" cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F864180%shortupdatever%F0}' />

</package>

</packages>


If you have any ideas please send me an email.

Thanks a lot :)


Best Regards

Mendim

[cid:image002.jpg at 01D20CE7.CF491E60]



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20160912/4bf2827e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 4940 bytes
Desc: image002.jpg
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20160912/4bf2827e/attachment-0001.jpg>


More information about the wpkg-users mailing list