[wpkg-users] Variables %SOFTWARE% without wpkg client

Rainer Meier r.meier at wpkg.org
Thu May 19 14:17:08 CEST 2011

Hi,

On 19.05.2011 10:40, LAPLAUD François wrote:
> Thanks for all your suggestions.
>
> In fact my aim is to define in one centralized place where my SOFTWARE repo is. I am running the wpkg.js script using a scheduled task running as SYSTEM user.
>
> I have one XML file per package stored in a package sub directory.
>
> May I define my software var in my empty package.xml file so it would be interpreted for every specific XML files ?

Package variables are only valid during installation of the package it is
defined in. WPKG tries to set a "clean" environment for each package - not
depending on whether another package which defines variables is applied before.

The way to go is to set these variables before WPKG is launched. For example
instead of launching wpkg.js directly. You simply launch wpkg.cmd which you put
in the same directory. It might looks as follows:

@echo off
set SOFTWARE=\\path\to\software
start /wait "wpkg" cscript "%~dp0wpkg.js" /synchronize

br,
Rainer