Hi Mark, Mark Cooke wrote: > I have just provoked a slightly unexpected behaviour with v1.1.0 of wpkg.js > > Conditions: > > 1. Package requires a reboot after it is installed or upgraded (removed & > re-installed). I have the reboot condition set in the install/upgrade > section for specific exit conditions. > > 2. WPKG Check conditions between the existing version and updated version > are the same. > > 3. To do the upgrade, I just increased the revision from 1 to 2. > > > WPKG logs indicate a successful upgrade, with an immediate reboot. However, > on the next reboot, the revision check fails. The implication is that > requesting an immediate reboot during an upgrade causes a reboot before > wpkg.xml has been rewritten with the successful revision data. > > Is this a bug, or am I misunderstanding ? It seems you're hitting a very special situation. Commands which require an immediate reboot are usually commands which cannot finish without rebooting and therefore it makes no sense for WPKG to verify if a package is installed/upgraded correctly before this reboot was done. I think in your case you should schedule a postponed or delayed reboot for your command instead of an immediate one (reboot="delayedReboot"). This makes sure all upgrade commands are run before the reboot takes place. The immediate reboot should be used only if a command requies a one-time reboot and it will exit with a different code on next execution. For example if an install/upgrade gommand requires a reboot to install a service and exits with another code next time because the service is already in place and up-to-date. In your case your installer seems to exit always with a code which requires a reboot. In this case it's clear that WPKG will always issue an immediate reboot after its execution. If your installer is somehow "dumb" and it always exits with a reboot instruction but actually the reboot is required only one single time then you need to assure yourself that the exit code indicates a reboot only once. A simple wrapper-script might do the job too.... @echo off echo Installing set FLAG=%TEMP%\installer-done if exist "%FLAG%" goto continue goto install :install start /wait "running installer" "%SOFTWARE%\installer.exe" /S REM set flag echo done > "%FLAG%" REM reboot system exit /b 3010 :continue del "%FLAG%" exit /b 0 It's not tested but this should assure that the reboot exit code (3010) is sent only once. After the reboot it will exit with code 0 and WPKG can continue to run. However this is just a work-around if an installer (wrongly) exits with a reboot exit code even if the software is already installed properly. I suggest trying the postponed/delayed reboot instead. br, Rainer |