WPKG

Last modified by Sebastian Marsching on 2022/05/29 14:08

Overview

WPKG is a free tool that allows to automate software distribution for Windows systems.

The software is written in JavaScript (actually JScript) and runs inside the Windows Scripting Host. There is a little helper program called WPKG Client that installs a Windows software that starts the script on system startup.

  • WPKG cannot run when network is not available. In newer versions of WPKG you can specify a script, that will check whether the network is available before running WPKG. Unfortunately, this script cannot run for more than 60 seconds.
  • When service is run with the SYSTEM account (instead of an administrative account), you have to make sure that WPKG can read the software packages by adding Domain Computers to the security configuration of the share and file-system folder.
  • The service can be started by a logon script (when network is available), but users need the right to manage the service:
  • See http://support.microsoft.com/default.aspx?scid=kb;en-us;288129 on how to give them the right or even better http://support.microsoft.com/kb/256345/ on how to do this using Group Policies.
  • When the service is not listed, you have to edit SYSVOL\<Domain>\Policies\<ID>\Machine\Microsoft\WindowsNT\SecEdit\GptTmpl.inf manually.
  • A login script with just one line can be used:
    net start WPKGService

Status UI

If you want to delay user logon while software is being installed, you might be interested in wpkg-gp). If you do not want to do this (maybe because you are worried about unnecessary delays for roaming users), you still might want to notify users after logon that software installation is in progress.

I wrote a little HTML Application, that does exactly this: show a small window that notifies the user of the software installation. When the installation is finished, the window closes itself. You can download the application and distribute it on your PCs. You just have to make sure that it is started each time a user logs in. An easy way to do this is [http://support.microsoft.com/kb/240791/en-us through group policies](http://support.microsoft.com/kb/240791/en-us through group policies). However, you can also use a registry entry.

Starting the application directly can cause problems, because (at least sometimes) the 32-bit version of mshta.exe will be used on 64-bit systems. If this happens, the application cannot read the registry keys created by WPKG and thus cannot display the status. Therefore, I use a little batch-file for making sure it is always started using the 64-bit version of mshta.exe:

@start %WINDIR%\System32\mshta.exe %~dp0\wpkg_status_ui.hta %*

Patching wpkg.js

The current version of WPKG (at time of writing version 1.3.0) has a bug that causes the running information not to be published in the registry. Even if this worked, it would only provide information about whether it is running, not what it is doing. Therefore I made a small patch that publishes this information in the registry. This way, the status UI will also show which package is just being installed or removed. You can download the patch or download the patched version of wpkg.js version 1.3.0.

Download

  • wpkg_status_ui.hta
  • The icon used in this application has been created by DesignContest and is licensed under the terms of the CC Attribution License 3.0. Feel free to replace this icon with another one that you might like better. In fact I use a different icon internally, however I can not distribute this icon with the application due to copyright restrictions.