[wpkg-users] Resuming actions after reboot

Rainer Meier r.meier at wpkg.org
Mon May 25 18:43:10 CEST 2009


Hi Malte,

Malte Starostik wrote:
> 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?

To make it short WPKG cannot resume at a certain stage since it does not save
where it stopped. Even worse in your case it executes all commands in sequence
and does not stop after the first command. So for WPKG all commands have been run.

But you might try the following. I think the clean way would be to stop the
"winvnc" service before upgrading. Thus avoiding a required reboot to replace
WinVNC completely. If the file is not locked (by running service) I assume the
installer will replace the file immediately. Then install and run the service
and finally you could even avoid the reboot completely.
Did you try this?
Well, it might not work with TightVNC but it's worth a try. So just try
extending your install commands to stop all TightVNC processes before starting
the installation/upgrade.

br,
Rainer



More information about the wpkg-users mailing list