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

LAPLAUD François laplaud at sdis72.fr
Thu May 19 14:22:19 CEST 2011


Thanks for this suggestion.
In fact my scheduled task is already running a bath calling wpkg.js.

I would have preferred to not set my env var here since this batch is running locally.

Anyway, I will certainly choose this solution since my batch is deployed via WPKG itself.

Thanks

Laplaud François
Service Informatique & Transmission
Service Départemental d'Incendie et de Secours de la Sarthe


-----Message d'origine-----
De : Rainer Meier [mailto:r.meier at wpkg.org] 
Envoyé : jeudi 19 mai 2011 14:17
À : LAPLAUD François
Cc : wpkg-users at lists.wpkg.org
Objet : Re: [wpkg-users] Variables %SOFTWARE% without wpkg client

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



More information about the wpkg-users mailing list