This post is a short tutorial for the alternative WPKG client WPKG-GP. It allows you to remotely install software via Group Policy.

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 isntalling

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-GP client - Progress

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.

WPKG-GP

14 Comments
  1. Rainer Meier 11 years ago

    Cool, article is already here 😉

    Let’s repeat myself…

    I’ve tried WPKG-GP and it definitely is the right way to go for Win7-Pro clients. But it does not work on Win7 Home Premium which unfortunately renders it useless for myself in most cases. Usually I just use WPKG client and schedule the service startup to delayed start so it runs a couple of minutes after start. The user might already have logged in at this point of time which leads to a small risk that the user just runs some application to be upgraded.

    Most installers will handle this situation properly. For others I’ve just included a taskkill command to close the application when in use. Usually such installers also just fail if the application is still running. So WPKG will just try again on next boot. Sooner or later it will succeed. Not the most clean solution but works in a couple of productive installations for me.

  2. hardcrack 11 years ago

    I’ve read about wpkg before. But I don’t see the advantage of deploying software using wpkg instead of the old and reliable group policy/software installation…

  3. Geoff Kendal 11 years ago

    It’s not restricted to MSI packages, so you can install pretty much anything, the run custom commands after the installation to neaten up the system, or preload app configuration etc.

  4. Monil gangar 11 years ago

    hi,
    i am trying to use WPKG but error message “The software installation has failed.”
    please help me…
    my server is in another machine and i am trying to use that in another client machine….
    i used this script:
    cscript \\IPAddress\WPKG\wpkg.js /debug /synchronise |more

    it is throwing the error message “the software installation has failed”
    please help me out
    Thanks

  5. Geoff Kendal 11 years ago

    Hi Monil,

    You need to carefully examine the output that WPKG gives when it runs your install commands – look for the exit code, anything other than 0 will indicate an error or warning usually.

  6. Rainer Meier 11 years ago

    This is not a support forum for WPKG. Try contacting the wpkg-users mailing list at .

    In your case likely your arguments are wrong. The “/synchronise” argument is not valid. It shall likely read “/synchronize”.

    Read the screen output carefully. Also check the log file written to %TEMP%\wpkg-.log by default.

    If you’re unable to sort out the problem. Post your debug log file and screen output on wpkg-users mailing list and I am sure you will get replies within less than a day.

  7. Monil gangar 11 years ago

    Rainer Meier:
    Thanks that worked for me….. 🙂

  8. Monil gangar 11 years ago

    it is working when i am trying to execute that command but not when restarting windows xp…

    i have also raise another revision but didn’t work for me…

    may be the same problem what you told to do at command line but how it will work while restarting the xp…

  9. Rainer Meier 11 years ago

    If it’s not working during restart, then it’s likely a configuration issue with the software running wpkg.js. If you use Windows XP you can use WPKG Client to run wpkg.js at startup even using logon delay – this means WPKG Client will display a message before allowing the user to log in.

    On Vista/7 there seems to be no way to delay the logon process. A work-around is to use WPKG-GP to “abuse” group policies to perform a WPKG run but it works only on Professional/Enterprise editions. I am personally running WPKG Client on Windows 7 too but here I always run the WPKG client service with delayed automatic start so it will just launch in the background while the user might have logged in already.

  10. Monil gangar 11 years ago

    Thanks,WPKG client worked for me…..

    is there any thing by which i can update the client software by some batch files without shut down or restart.
    by wpkg client the updates are deployed by logon delay or at the time of shut down.i want to update the software without shut down or restart.
    is it possible with that batch file option?
    reply.;
    thanks.

  11. Flori 11 years ago

    Hi,

    worked since i reinstalled my test-pc:

    Now comes in debug mode following error —-

    “unable to find any matching host definition”

    Can´t say what error that is; Connection between WPKGServer and PC works so far (OK OK)

  12. Geoff Kendal 11 years ago

    I guess your computer name has changed?

    Your computer will need assigning to a profile in hosts.xml

    or at least have a ‘catch all’ base profile in hosts.xml:

  13. Rainer Meier 11 years ago

    @Monil: You can allow users to run the WPKG service. For example using subinacl.exe (subinacel /SERVICE “WpkgService” /GRANT=Users=TO

    Then configure WPKG service to terminate after it finished it’s job so users can re-start the service any time they want. Note: If users will not close their application before running WPKG then some locked files might prevent proper upgrades.

    @Flori: This indicates that you do not have an entry in hosts.xml which matches your machine name. So WPKG does not know which profile to assign to the host.

  14. Flori 11 years ago

    @Geoff / Rainer : Thank you !

    That was the problem -_- , no specified host ….

Leave a reply

Please enclose code in pre tags

Your email address will not be published.

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account