[wpkg-users] trouble with check conditions

Rob Bos rbos-wpkg at novylen.net
Thu Feb 21 20:35:31 CET 2013

I'm trying to write a package that will install a patch if necessary, 
but install the base version if it doesn't exist, but I'm running into 
problems with the evaluation of check conditions. Specifically, Adobe 
Acrobat, which requires that you first install up to the most recent 
quarterly release, and then apply out-of-cycle patches on top of that.

So I can go none->10.1.5->10.1.6, or 10.1.5->10.1.6.

What I have so far:

     <!-- install the base version plus the latest quarterly if version 
is less than current quarterly; eg upgrade if 10.1.0 but not 10.1.5 -->
     <install workdir='%LOCALCACHE%\%PKG_PATH%' cmd='msiexec /qb- /i 
             <check type='logical' condition='or' >
                 <check type='logical' condition='not' ><check 
type="uninstall" condition="exists" path="%ADOBE_REGKEY%" /></check>
                 <check type="uninstall" condition="exists" 

     <!-- if latest quarterly, apply OOC patches in correct order. This 
section has to be maintained manually. -->
     <install workdir='%LOCALCACHE%\%PKG_PATH%' cmd='msiexec /qb- /p 
AcrobatSecUpd1016.msp /log %LOG_PATCH% /norestart'>
         <condition><check type="uninstall" condition="versionequalto" 
path="%ADOBE_REGKEY%" value="10.1.5" /></condition>

What actually happens, on a from-scratch install, is that 10.1.5 
installs, but 10.1.6 patch doesn't. On a computer that has 10.1.5 
installed already, 10.1.6 installs.

What seems to be happening is that WPKG is evaluating the results of the 
uninstall check once, and using it twice. So in the "bare metal" case, 
the full install goes off, but the patch doesn't install because the 
uninstall check isn't re-evaluating; it's using the cached value.

So, if I'm understanding this correctly.. is there any way to force the 
re-check of the uninstaller key for the second check rather than using 
the cached version?

More information about the wpkg-users mailing list