[wpkg-users] Install commands and conditions

Nicolas BRICHE nbriche at ch-peronne.fr
Tue Oct 22 18:47:51 CEST 2013


Rainer Meier a écrit , Le 22/10/2013 12:51:
> 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 understand, and I have modified my approach accordingly.

During tests however, it seems that while the .msi does close immediately when
encountering an already installed Reader, msiexec still first downloads the
complete .msi.

The .msp quarterly patch seems to apply itself whether it's needed or not (that,
or it takes 35sec to terminate).

Seeing as my main reason for those install command conditions were to not even
touch the binaries unless it's necessary (some of my clients have a 1Mb/s DSL
link), I've managed to find a suitable method:

<install cmd='INSTALL_READER_MSI'>
  <condition>
    <check type="logical" condition="not">
      <check type="uninstall" condition="exists" path="Adobe Reader XI +." />
    </check>
  </condition>
</install>

<install cmd='INSTALL_READER_QUARTERLY' >
  <condition>
    <check type="logical" condition="or">
      <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
      <check type="uninstall" condition="versionsmallerthan" value="11.0.04"
path="Adobe Reader XI +." />
    </check>
  </condition>
</install>

<install cmd='INSTALL_READER_PATCH' >
  <condition>
      <check type="logical" condition="not"><check type="uninstall"
condition="exists" path="Adobe Reader XI .+" /></check>
      <check type="uninstall" condition="versionsmallerthan" value="11.0.05"
path="Adobe Reader XI +." />
    </check>
  </condition>
</install>

In other words:

- Install the MSI if there's no Reader
- Install the quarterly either if there's no reader or if the reader has a patch
level < 11.0.04
- Install the patch either if there's no reader or if the reader has a patch
level < 11.0.05


It seems to work; it patches a 11.0.04 to .05 in 10sec.


Cordialement,

Nicolas BRICHE
Service Informatique
Centre Hospitalier de Péronne



More information about the wpkg-users mailing list