[wpkg-users] Use regex to get installed version number?
Nils Thiele
it.service.kultur at uni-hamburg.de
Thu Feb 26 10:51:49 CET 2015
Hey,
we are currently still deploying java 7.
i was looking into java 8 but it seems oracle removed the function to
automaticly remove the installed version and replace it with the new one
like in java 7, instead it will install the update additionally.
The easiest solution is of course to keep the previous versionnumber in
the package and remove it before the installation of the new one.
But this wont work if a system doesnt have the last release but maybe a
older one because it hasnt connected to the server that often.
Now i was wondering if it is possible to use regex to fix this problem
inside the package file without having to rely on other problems.
If you use regex command like this
Java.8.Update.([0-9]*)
the result of regex is the sub version number.
Is it possible to integrate the results of a check into a wpkg variable?
Something like this:
<check type="uninstall" condition="exists" path="Java 8 Update ([0-9]*)"
/>
<variable name="oldsubversion" value="%regexcheckresult%" />
<upgrade cmd='msiexec.exe /qn /x
{26A24AE4-039D-4CA4-87B4-2F832180%oldsubversion%F0}' />
This obviously wont work, just wondering if something like this is
possible at all without having to rely on a "outside" wpkg script.
Thanks!
Best regards,
Nils
--
IT-Support - Fachbereich 09 Kulturgeschichte und Kulturkunde
Universität Hamburg
Email: it.service.kultur at uni-hamburg.de
More information about the wpkg-users
mailing list