- How to add holidays to the Exchange calendar with PowerShell - Wed, Apr 23 2014
- How to change the domain name in Exchange Server 2010 - Tue, Apr 8 2014
- How to enable Unsolicited Remote Assistance in Windows 7 / 8 - Tue, Oct 1 2013
Now that we have configured WPKG on the server side, all that remains to be done, is to tell our client system to run the WPKG script (with administrator privileges). WPKG should then manage our software as per our config files. Whereas the WPKG project does provide a client, I prefer to use the alternative WPKG-GP client.
The reason I prefer WPKG-GP is that it hooks into the startup process via Group Policy extensions, and runs WPKG before users have a chance to login, so you don’t need to worry about applications being open when you are trying to upgrade them.
Once you downloaded WPKG-GP, run the setup, and install all components. For simplicity we will enable local policies, although it is possible to configure WPKG-GP via Group Policy. During the setup process you will need to browse to the file share where you copied the WPKG files to. The final screen of the installer will ask you for an account that has permissions to connect to the WPKG share. I suggest creating a dedicated account for WPKG for this. Don’t forget to give this account read access to your WPKG share!
At this point we have our WPKG configuration files on our server and the WPKG-GP client installed. If we reboot and carefully watch the bootup process, just after "Applying computer settings…" you should see WPKG-GP kick in and do its thing. If all went well, WPKG-GP will install the 7-Zip package.
WPKG-GP installing 7-zip
Occasionally, you might encounter a problem with WPKG, where your package isn’t correctly installing (It might be attempting to install every time, but never appearing on the client). We can locate the problem by running the WPKG.js from the command line, and watching the output. Fire up an administrator command prompt and run the following command:
cscript \\SERVER\WPKG\wpkg.js /debug /synchronise |more
This will run the WPKG engine and display its progress step-by-step. While writing this article 7-Zip wasn’t installing and the output of the above command told me that the installation was returning error code 1619. A quick search revealed that this error means the installer package couldn’t be found. I corrected the typing mistake in the MSI path in my packages.xml, increased the revision number, then retried to find that 7-zip installed without problems.
WPKG installation progress
Once you are happy with your WPKG software deployment setup, it’s relatively simple to tie it in so that it kicks in after a system deployment via WDS.
From WDS we just need to run the WPKG-GP client installer as a "FirstLogonCommand" in our unattend.xml. Luckily, we had already configured the batch script postbuild.cmd which we can use for this purpose. Just add the following command to the batch script:
wpkg-gp-version_x86.exe /S /NetworkUsername CONTOSO\WpkgInstallUser /NetworkPassword Pa$$w0rd /WpkgCommand \\server\Wpkg\Wpkg.js
shutdown /t60 /r
Obviously you will need to replace the relevant parts to suit our environment. This will cause the WPKG-GP client to be silently installed, reboot system, and then start installing the software packages.
You should now have a configuration that is ready for remote bare metal system and software deployment. While it does take a bit of time and patience to get all your software properly installing with WPKG, it will certainly make life a lot easier in the long run.