Changes

WPKG

691 bytes removed, 12:21, 6 July 2008
m
WPKG Client upgrade
= WPKG Client upgrade =
Computer scientists love recursion, or bootstrap, so this it a try You need Windows Installer 3.1 installed to write a upgrade WPKG xml file that... installs itself. Some theory first.<br />Upgrade will not work if WPKG the service is running. Therefore, you have to kill WPKGsrv.exe process first. On XP, it can be done with <code>taskkill</code> command; on (or any other Windows 2000MSI package, which doesn't have <code>taskkill</code> command, you can use an external <code>pskill</code> command. '''NOTE: this won't work if you use logon delay featurewhere the software runs during the upgrade).'''
<source lang="xml">
<check type="file" condition="versionequalto" path="%PROGRAMFILES%\wpkg\wpkginst.exe" value="1.0.0.8" />
<install cmd='cmd msiexec /C start C:norestart /qn /i "%SOFTWARE%\wpkgWPKG\softwareWPKG Client 1.2.1.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\wpkg_upgradesettings.batxml"' /> <!-- ping is to make sure wpkg.js pauses and doesn't reboot on some later package while WPKG Client is still being installed or upgraded --> <install upgrade cmd='ping -n 120 127msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client 1.02.01.msi" ALLUSERS=1 >nulSETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"' />
<upgrade cmd='cmd /C start C:\wpkg\software\WPKG\wpkg_upgrade.bat' />
<upgrade cmd='ping -n 120 127.0.0.1 >nul' />
</package>
<!-- <remove cmd='msiexec /qn /x{D6D68FEC-0044-4E2A-9333-6C4BC1D5B1DE}' /> --> <!-- 1.2rc5 -->
</package>
</source>
 
 
Here is <code>wpkg_upgrade.bat</code> script:
 
<source lang="dos">
taskkill /F /IM WPKGSrv.exe
ping -n 5 127.0.0.1 >nul
msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client 1.2.1.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"
exit
</source>