WPKG with Wine

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

Although WPKG was written to ease Windows administration, it can also run on other platforms through Wine, an Open Source implementation of the Windows API on top of X and Unix.

Using WPKG on Linux may be helpful in the following situations:

  • we don't have a Windows machine and would like to see how WPKG works
  • we have a double-boot system, and we don't feel like rebooting to Windows to see how WPKG works
  • we would like to change some code in WPKG, and test how it works

To use WPKG with Wine, you have to install:

To install Internet Explorer on your non-Linux system, search through the Wine website, you should find links to articles describing how to do it.

Installing scripten.exe is easy, just do "wine scripten.exe".

Below - a sample output of WPKG running on a Linux box:

$ wine cscript wpkg.js /synchronize /debug
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Settings file does not exist. Creating a new file.
saving XML : C:\windows\system\wpkg.xml
settings file contains 0 packages:

packages file contains 2 packages:

Using profile: custom
profile: custom profileNode:
number of available packages: 2
checking existence of package:Mozilla Firefox 1.0.7
Checking presence of Mozilla Firefox 1.0.7; file check condition met.
Bypassing installation of package Mozilla Firefox 1.0.7
saving XML : C:\windows\system\wpkg.xml
Installation of Mozilla Firefox 1.0.7 successful.
Executing commands for notepad...
executing command : notepad

If you're curious, just make a "wpkg" directory, for example here:

Program Files/ windows/ wpkg/

and put wpkg.js, hosts.xml, packages.xml and profiles.xml files into it.

Below - sample files that I used on a Linux box.



    <host name="mangoo2" profile-id="custom" />




   name="Mozilla Firefox 1.0.7"
  <check type="file" condition="exists" path="C:\Program Files\Mozilla Firefox\firefox.exe" />
  <install cmd='"C:\Firefox Setup 1.0.7.exe" -ms'>
   <exit code="0" />
  <remove cmd='C:\Windows\UninstallFirefox.exe -ms' />

  <install cmd='notepad' />




   <profile id="custom">
       <package package-id="firefox" />
       <package package-id="notepad" />