[wpkg-users] Install commands and conditions
Stefan Pendl
stefan.pendl.71 at gmail.com
Tue Oct 22 18:41:57 CEST 2013
Am 22.10.2013 12:51, schrieb Rainer Meier:
> Hi Nicolas,
>
> On 22.10.2013 12:06, Nicolas BRICHE wrote:
>> WPKG installs the MSI OK, but fails the rest. Reading the log, it
>> looks like
>> all the checks for all the commands are made _before_ any command is
>> executed.
>
> This is true and it is designed like this. Else also previous commands
> (including the one just run) would have to be re-evaluated after any
> change to the system or command run. Basically WPKG will remove the
> XML nodes from the package definition which are not evaluating true on
> checks.
>
> In case of adobe reader you can just apply the MSI, latest rollup
> patch (MSP) and security fix (MSP). The installation will just abort
> immediately if the update has been applied already. No need for WPKG
> to do the same level of check again and preventing execution. Just
> apply them in order.
>
I use the following package for Adobe Reader.
'---code start (watch for line wraps)
<package id="AdobeReader11" name="Adobe Reader 11" revision="%PKG_VER%" reboot="false" priority="10">
<variable name="PKG_NAME" value="AdobeReader11" />
<variable name="PKG_VER" value="11.0.5" />
<variable name="PKG_VER_MAIN" value="11000" />
<variable name="PKG_VER_START" value="11001" />
<variable name="PKG_VER_END" value="11005" />
<variable name="PKG_LNG" value="en_US"/>
<variable name="PKG_LNG" value="de_DE" lcid="407,c07,1407,1007,807" />
<variable name="PKG_ATT" value="EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES AgreeToLicense=Yes ENABLE_CACHE_FILES=No ALLUSERS=1" />
<check type="uninstall" condition="versiongreaterorequal" path="Adobe Reader .+" value="%PKG_VER%" />
<install cmd='MsiExec.exe /norestart /passive /log "%TMP%\%PKG_NAME%.log" /i "%SOFTWARE%\Adobe Reader\AdbeRdr%PKG_VER_MAIN%_%PKG_LNG%.msi" %PKG_ATT% ' >
<exit code="3010" reboot="false"/>
</install>
<install cmd='%ComSpec% /c for /l %V in (%PKG_VER_START%,1,%PKG_VER_END%) do @for %F in ( AdbeRdrUpd%V AdbeRdrSecUpd%V) do if exist "%SOFTWARE%\Adobe Reader\%F.msp" MsiExec.exe /norestart /passive /log "%TMP%\%PKG_NAME%_%V.log" /update "%SOFTWARE%\Adobe Reader\%F.msp" ' >
<exit code="3010" reboot="false"/>
</install>
<upgrade include="install" />
<remove cmd='MsiExec.exe /norestart /passive /log "%TMP%\%PKG_NAME%.log" /x "%SOFTWARE%\Adobe Reader\AdbeRdr%PKG_VER_MAIN%_%PKG_LNG%.msi"' />
</package>
'---code end
--
Stefan P.
Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
More information about the wpkg-users
mailing list