[wpkg-users] Resuming actions after reboot

Malte Starostik malte at malte.homeip.net
Mon May 25 11:14:45 CEST 2009


Hi,

I came accross this problem while installing TightVNC:

<install cmd='"%SOFTWARE%\tightvnc\tightvnc-1.3.10-setup.exe" /SP- /VERYSILENT 
/NORESTART /RESTARTEXITCODE=3010'>
    <exit code='3010' reboot='postponed' />
</install>
<install cmd='netsh firewall add allowedprogram 
program="%ProgramFiles%\TightVNC\WinVNC.exe" name="VNC" scope=ALL profile=ALL' 
/>
<!-- install cmd='"%ProgramFiles%\TightVNC\WinVNC.exe" -silent -reinstall' / 
-->
<install cmd='"%ProgramFiles%\TightVNC\WinVNC.exe" -reinstall' />
<install cmd='net start winvnc' />
<install cmd='"%ProgramFiles%\TightVNC\WinVNC.exe" -servicehelper' />

On some machines, version 1.3.9 was manually installed before deploying WPKG, 
so the check fails and installation is started.  This is fine as the setup 
will do the right thing.
However, for 1.3.10 the commented out WinVNC.exe -silent -reinstall will save 
a few seconds while the old version 1.3.9 doesn't recognize -silent and will 
block with a usage dialog. So I resorted to the non-commented version and 
setup will display a (hidden) message box.  As the message box has a timeout 
this isn't critical either, yet the command will still call the old version of 
WinVNC.exe as it's going to be replaced on reboot, which at least isn't 
exactly clean.
If I change the postponed reboot to an immediate one, this problem is solved, 
but on the next run, the checks will succeed and the remaining actions won't 
be run.  If I modify the checks to see if all of the above commands completed, 
the installer will be run again.

Long story short: is there a way to have an action trigger an immediate reboot 
and have WPKG remember this and pick up the installation *after* this action 
regardless of the checks after rebooting?

Cheers,
Malte



More information about the wpkg-users mailing list