WPKG Client

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

WPKG Client

WPKG Client is the client side of WPKG. It provides a service which automatically runs WPKG each time a machine is turned on and a graphical interface for configuring how it will run.

WPKG Client is available from the download page.

Silent installation

WPKG Client comes as a MSI package and you can install it silently like below:

msiexec /qn /i WPKGSetup.msi SETTINGSFILE=f:\wpkg\images\setup\settings.xml

To silently update the settings of an already installed WPKG Client, use:

%PROGRAMFILES%\WPKG\wpkginst.exe --SETTINGSFILE=f:\wpkg\images\setup\settings.xml

settings.xml file can be exported from GUI - see WPKG Client - GUI help.

Silently upgrade and change settings

WPKG Client cannot install itself, but you can use it for upgrade or change settings. See the silent installer for details.

Installation via Group Policy

A particularly easy way to install the WPKG on a large number of workstations is through Group Policies. Group policies do not allow passing arguments on a command line, but instead through MSI Transform files.

Software installed via the Group Policies is automatically installed by Windows the next time you reboot the workstation. Group Policies let you determine exactly which computers the policy applies to, and therefore which computers WPKG will be installed on.

Creating a Transform

You will need to download the Orca tool from Microsoft. This is a free tool described here http://support.microsoft.com/default.aspx/kb/255905.

After you install it, right-click on the WPKGSetup.msi file and select "Edit in ORCA". Do not use "Install"! Then select the Transform | New Transform menu item.

Select the table called "Properties" from the lefthand pane. In the Properties window (righthand pane), right-click and select "Add Row".

  • Set the Property field to: SETTINGSFILE
  • Set the Value field to: f:\wpkg\images\setup\settings.xml

(obviously, the path to your settings.xml may differ from the example above!)

Now click on the Transform | Generate Transform... menu item and save the Transform with the extension .MST.

Installing via Group Policy

Open the Group Policy Management Console and find or create a suitable Group Policy. Then Edit this Group Policy.

You install software in the Computer Configuration | Software Settings section. Right-click and select add package. Select the WPKGSetup.msi file. Next, you will be asked how you want to deploy this; the options are Assigned or Advanced. WARNING: You MUST select "Advanced" - "Assigned" will not allow you to add a Transform. Once the package is added, you cannot add the transform later!

You add the transform in the Modifications tab.

In some cases, you may have to reboot the workstation up to three times before the WPKG service is actually running. The first reboot loads the new Group Policy (you can instead do this from the command line with the command "gpupdate /force /boot" ). The second reboot will actually install the WPKG MSI. The third reboot will start the service.

Group Policy WPKG mix

One other possibility is to use Group Policy to kick off wpkg.js so it can install WPKG-Client for you. using this method also allows you to upgrade and change WPKG Client parameters in the future using WPKG itself.


7-22-14: Updated to include uninstall at Up/Down and proper uninstall strings for x86 and x64 using MSI file. Updated for newest version 1.3.14. For ease of future updates, rename MSI file to generic "WPKGClientx86.msi" or "WPKGClientx64.msi" based upon architecture. Set script to delete the WPKG.xml file to ensure it is getting the newest version. When updating, all you need to do is rename the actual MSI file and change the revision. Tested on XP and Win7.

First create a WPKG-Client package like this:

<?xml version="1.0" encoding="UTF-8"?>

<packages:packages xmlns:packages="http://www.wpkg.org/packages"
	xmlns:wpkg="http://www.wpkg.org/wpkg" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.wpkg.org/packages ../xsd/packages.xsd">

	   name="WPKG Client 1.3.14"
 	<!-- because the client hasn't been installed yet we cannot use the SOFTWARE parameter for paths -->
	<variable name="PKG_PATH" value="<path to package>" />
	<variable name="XML" value="c:\windows\System32\wpkg.xml" />

        <!-- Check for EXE file version to see if already installed and up to date -->
	<check type="file" condition="versionequalto" path="%PROGRAMFILES%\wpkg\wpkginst.exe" value="" />
		<!-- Install x86 Client -->
		<install architecture="x86" cmd="%ComSpec% /c del %XML%" />
	   	<install architecture="x86" cmd="msiexec /i %PKG_PATH%\x86\WPKGClientx86.msi /qn SETTINGSFILE=%PKG_PATH%\WPKG_Settings.xml" />

		<!-- Install x64 Client -->
		<install architecture="x64" cmd="%ComSpec% /c del %XML%" />
		<install architecture="x64" cmd="msiexec /i %PKG_PATH%\x64\WPKGClientx64.msi /qn SETTINGSFILE=%PKG_PATH%\WPKG_Settings.xml" />
		<!-- Upgrade x86 Client -->
		<upgrade architecture="x86" cmd="%ComSpec% /c del %XML%" />
		<upgrade architecture="x86" cmd="msiexec /x %PKG_PATH%\x86\WPKGClientx86.msi /qn" />
 	  	<upgrade architecture="x86" cmd="msiexec /i %PKG_PATH%\x86\WPKGClientx86.msi /qn SETTINGSFILE=%PKG_PATH%\WPKG_Settings.xml" />
		<!-- Upgrade x64 Client -->
		<upgrade architecture="x64" cmd="%ComSpec% /c del %XML%" />
		<upgrade architecture="x64" cmd="msiexec /x %PKG_PATH%\x64\WPKGClientx64.msi /qn" />
	   	<upgrade architecture="x64" cmd="msiexec /i %PKG_PATH%\x64\WPKGClientx64.msi /qn SETTINGSFILE=%PKG_PATH%\WPKG_Settings.xml" />
		<!-- Downgrade x86 Client -->
		<downgrade architecture="x86" cmd="%ComSpec% /c del %XML%" />
		<downgrade architecture="x86" cmd="msiexec /x %PKG_PATH%\x86\WPKGClientx86.msi /qn" />
 	  	<downgrade architecture="x86" cmd="msiexec /i %PKG_PATH%\x86\WPKGClientx86.msi /qn SETTINGSFILE=%PKG_PATH%\WPKG_Settings_AUC.xml" />
		<!-- Downgrade x64 Client -->
		<downgrade architecture="x64" cmd="%ComSpec% /c del %XML%" />
		<downgrade architecture="x64" cmd="msiexec /x %PKG_PATH%\x64\WPKGClientx64.msi /qn" />
	   	<downgrade architecture="x64" cmd="msiexec /i %PKG_PATH%\x64\WPKGClientx64.msi /qn SETTINGSFILE=%PKG_PATH%\WPKG_Settings_AUC.xml" />

		<!-- Uninstall Client -->
		<uninstall cmd="%ComSpec% /c del %XML%" />
		<uninstall architecture="x86" cmd="msiexec /x %PKG_PATH%\x86\WPKGClientx86.msi /qn" />
		<uninstall architecture="x64" cmd="msiexec /x %PKG_PATH%\x64\WPKGClientx64.msi /qn" />


Then in Active Directory, create a new Group Policy object with the following setting:

  • Computer Configuration → Windows Settings → Scripts(startup/shutdown) → Startup
    • Script: \\myserver\myshare\wpkg.js
    • Parameters: /install:WPKGClient /quiet

Job done!

Advanced installation

If for some reason you can't use MSI, you can install WPKG Client manually:

  • You need the files - the easiest way is to install WPKG Client on one machine, and copy contents of %PROGRAMFILES%\wpkg\ to another machine

  • Start cmd.exe and run:
prompt> cd %PROGRAMFILES%\wpkg
prompt> WPKGsrv.exe /install
WPKG Service installed.

If it throws an error, there is something fishy - most likely missing libraries (dll). You can check what libraries are missing with Dependency Walker. Other useful flags to WPKGsrv.exe are /debug and /remove.

  • Configure settings:
prompt> wpkginst

Put notepad as "execute before", and check "Show GUI".

  • Start the service - it should start notepad.exe:
prompt> net start "WPKG service"

It should start without errors, and notepad.exe should start shortly.

If it works, configure the setting properly (users, paths etc.).


Use the 'WPKG Client' (wpkginst.exe) located in %PROGRAMFILES%\wpkg\ to configure such aspects as the user to log into the server as, the user to run on the local machine, whether to run silently or not, et cetera.

See WPKG Client - GUI help for more info.


When testing and troubleshooting, you can start WPKG Client manually from within Windows' Services management section, by using the Start and Stop button for the 'WPKG Service', rather than by restarting the machine.

Look in Windows' Event Viewer for explanations of what might have gone wrong, and reports of parts going right.

See Also

WPKG-GP - Another WPKG client built for Windows Vista and later versions of Windows