[wpkg-users] Resuming actions after reboot

Malte Starostik malte at malte.homeip.net
Mon May 25 19:16:18 CEST 2009


Hi Rainer,

Am Montag, 25. Mai 2009 18:43:10 schrieb Rainer Meier:
> > 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.
That's what I do for the upgrade actions and it might indeed be an option for 
install, too (ignoring the exit code).
Yet it occurs to me that such a feature might be worth some more exploration?  
Or to put it another way: I'm in the process of gradually switching our 
software deployment to WPKG and should I encounter more cases where a reboot 
in the middle of the installation is needed - and maybe less easily worked 
around than with TightVNC - I might (very very very vague "might") give it a 
try.  Thus the next question: if that happens, would this be something you'd 
include when given a patch, or would this be rather unwanted?

Regards,
Malte



More information about the wpkg-users mailing list