3,217
edits
Changes
WPKG
,no edit summary
Computer scientists love recursion, or bootstrap, so this it a try to write a WPKG xml file that... installs itself.
'''NOTE: upgrade will not work if WPKG service is running. Therefore, you have to kill WPKGsrv.exe process first. On XP, it can be done like below; on Windows 2000, which doesn't have <code>taskkill</code> command, you can use an external <code>pskill</code> command.''' <source lang="dos">taskkill /F /IM /WPKGsrv.exemsiexec /qn /i "%SOFTWARE%\wpkg\WPKG Client 1.2-rc1.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\wpkg\settings.xml"</source> Here is the XML which '''does not''' contain killing WPKGsrv.exe: <presource lang="xml"> <package
id="wpkg"
name="WPKG"
<!-- <remove cmd='msiexec /qn /x{2F7AB97F-17EC-4128-9BD1-903FC71F1B52}' /> --> <!-- 1.2rc6 -->
<!-- <remove cmd='msiexec /qn /x{D6D68FEC-0044-4E2A-9333-6C4BC1D5B1DE}' /> --> <!-- 1.2rc5 -->
id="wpkg-settings"
name="WPKG Settings"
<upgrade cmd='%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=%WPKGROOT%\settings.xml' />
<remove cmd='echo "nothing"' />
I use this setup from now to install all the stuff with a single command; I've simply build up a batch file that defines the same environment variable defined in settings.xml and start directly wpkg.js, as:
install Log for computers
<presource lang="xml">
<package id="wpkglog" name="wpkg.xml files from workstations" revision="1" priority="0" execute="always">
<install timeout="15" cmd='cmd /C copy /Y "%SYSTEMROOT%\system32\wpkg.xml" "\\serwer\hostlogs\%COMPUTERNAME%-wpkg.xml"' />
</package>
</presource>
remove wpkg.xml
<presource lang="xml">
<package id="wpkgxmlremove" name="wpkg.xml remove" revision="1" priority="0" execute="once">
<install timeout="15" cmd='cmd /C del /Q "%SYSTEMROOT%\system32\wpkg.xml"' />
</package>
</presource>
[[Category:Silent Installers]]