[wpkg-users] Remote site repositories

Rainer Meier r.meier at wpkg.org
Tue May 15 10:24:30 CEST 2012

Hi Marco,

On 15.05.2012 09:45, Marco Gaiarin wrote:
>> If network then SOFTWARE=\\192.168.1.x\wpkg\software
>> If network then SOFTWARE=\\192.168.2.x\\wpkg\software
> I'm a bit curious. How do you check network address with cmd? I've
> googled around a bit, but...

Using recent WPKG version you don't have to match it via cmd.exe (although you 
could potentially using "ipconfig | findstr...").

But you could also define conditional variables in profiles.

<profile id="site1"
   <variable name="SOFTWARE" value="\\server1\wpkg\software">
       <check type="host" condition="ipaddress" value="^192\.\168\.1" />
   <variable name="SOFTWARE" value="\\server2\wpkg\software">
       <check type="host" condition="ipaddress" value="^192\.\168\.2" />

NOTE: It's entirely untested, I have just put this XML sniplet together in my 

As you see the purpose is that the SOFTWARE variable is defined on a profile by 
WPKG. The variable is conditional and depends on the value of the IP address. If 
the IP address does not match, then the whole variable statement is ignored. 
Therefore only one of the SOFTWARE variables will be assigned.
You can also use regular expressions to match different ranges.

If you're going to use this, then please report if it works for you as I did not 
test it myself.

More details about extended host attribute matching for IP addresses:


More information about the wpkg-users mailing list