Difference between revisions of "WPKG"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m (add cat)
(WPKG Client upgrade: Update package definition for 1.3.14)
Line 21: Line 21:
  
 
<source lang="xml">
 
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
 
 
<packages>
 
 
 
<package
 
<package
  id="wpkg_client"
+
  id="wpkg_client"
  name="WPKG Client 1.3.9"
+
  name="WPKG Client"
  revision="6"
+
  revision="%version%"
  reboot="false"
+
  reboot="false"
  priority="10">
+
  priority="10">
  
  <check type="uninstall" condition="exists" path="WPKG" />
+
  <variable name="version" value="1.3.14" />
  <check type="file" condition="versionequalto" path="%PROGRAMFILES%\wpkg\wpkginst.exe" value="1.0.0.18" />
+
  <check type="uninstall" condition="versionequalto" path="WPKG" value="%version%"/>
 
+
  <install cmd='msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client 1.3.9-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"' />
+
 
+
  <upgrade cmd='msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client 1.3.9-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"' />
+
  
 +
  <install cmd='msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client %version%-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"'>
 +
    <exit code="3010" reboot="false" />
 +
  </install>
  
 +
  <upgrade cmd='msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client %version%-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"'>
 +
    <exit code="3010" reboot="false" />
 +
  </upgrade>
 
</package>
 
</package>
 
</packages>
 
 
</source>
 
</source>
  

Revision as of 19:05, 25 August 2011

Initial WPKG Client deployment

WPKG Client is available as a MSI package.

It can be installed silently from command line or in a script like below:

msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client 1.3.9-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"


If you have wpkg.js already configured, simply add the XML file below (see "WPKG Client upgrade") to your packages/profiles and run:

cscript \\path\to\wpkg.js /synchronize /quiet

WPKG Client upgrade

You need Windows Installer 3.1 installed to upgrade WPKG if the service is running (or any other Windows MSI package, where the software runs during the upgrade).

<package
  id="wpkg_client"
  name="WPKG Client"
  revision="%version%"
  reboot="false"
  priority="10">

  <variable name="version" value="1.3.14" />
  <check type="uninstall" condition="versionequalto" path="WPKG" value="%version%"/>

  <install cmd='msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client %version%-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"'>
    <exit code="3010" reboot="false" />
  </install>

  <upgrade cmd='msiexec /norestart /qn /i "%SOFTWARE%\WPKG\WPKG Client %version%-x32.msi" ALLUSERS=1 SETTINGSFILE="%SOFTWARE%\WPKG\settings.xml"'>
    <exit code="3010" reboot="false" />
  </upgrade>
</package>

Changing WPKG Client settings

Note - don't use quotations (") after --SETTINGSFILE - it will be interpreted directly, as part of the name.

--SETTINGSFILE=\\server\some\path to settings\file.xml is fine and will be interpreted correctly.

<package
        id="wpkg-settings"
        name="WPKG Settings"
        revision="5"
        priority="5"
        reboot="false"
        execute="once">
        <depends package-id="wpkg"/>
 
        <install cmd='"%PROGRAMFILES%\WPKG\wpkginst.exe" --SETTINGSFILE=%SOFTWARE%\WPKG\settings.xml' />
        <upgrade cmd='"%PROGRAMFILES%\WPKG\wpkginst.exe" --SETTINGSFILE=%SOFTWARE%\WPKG\settings.xml' />
        <remove cmd='echo "nothing"' />
</package>

Other

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:

:: Startup script for wpkg, for the first installation
::

:: These are not (still) defined elsewhere, define it.
::
set WPKGROOT=\\FILE\wpkg
set SOFTWARE=\\MEDIA\Software
set VPSERVER=MORPHEUS

:: Call directly wpkg.js, note the %* at the end, that permit to add custom parameters...
::
cscript %WPKGROOT%\wpkg.js /synchronize %*


Copy wpkg.xml entry from workstation to the server:

<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>