[wpkg-users] More ways of defining hosts in hosts.xml - applymultiple

Jindrich Vorlicek jvorlicek at gmail.com
Thu Apr 23 00:33:46 CEST 2009


-new switch /applymultiple added:
Picture yourself, that you have this host.xml:
   <host name="PC1" profile-id="profile1" />
   <host name="PC2" profile-id="profile2" />
   <host name="PC1;PC3" profile-id="profile3" />
   <host name="PC.+" profile-id="profile4" />

If you will run wpkg.js on PC1, only one profile will be applied by
default (profile1).
If you use wpkg.js /synchronize /applymultiple all matching profiles
will be applied (profile1,profile3,profile4).

It's important to tell, that there is one exception to compatibility
with original wpkg.js:
If you want to use my patched wpkg.js without switch /applymultiple,
there is one thing, you must do before.
If you have hosts.xml like this:
   <host name="PC.+" profile-id="profile" />
   <host name="192.168.1.1" profile-id="profile" />
   <host name="PC1" profile-id="profile" />
   <host name="192.168.1.2" profile-id="profile" />
   <host name="PC3" profile-id="profile" />
   <host name="Comp.+" profile-id="profile" />
   <host name="PC4" profile-id="profile" />

you must reorder nodes to:
   <host name="PC1" profile-id="profile" />
   <host name="PC3" profile-id="profile" />
   <host name="PC4" profile-id="profile" />
   <host name="192.168.1.1" profile-id="profile" />
   <host name="192.168.1.2" profile-id="profile" />
   <host name="PC.+" profile-id="profile" />
   <host name="Comp.+" profile-id="profile" />

First must be exact names, second IP addresses and third regular expressions.

It is because original wpkg.js script search firstly for exact name,
secondly for IP address and thirdly for regular expression.
My patched script just search for first matching profile (if started
without switch /applymultiple).

It's because there is now more ways to define hosts in hosts.xml and I
don't know, how should be set priorities:
-has <host ou="mydomain.local/Classrooms"/>  priority to  <host
name="PC1"/>  or vice versa?
-has <host group="Domain Computers"/>  priority to  <host
system="xp.+sp2"/>  or vice versa ?
-and what combination of attributes such as <host name="PC.+"
system="xp.+sp2"/>? Has priority to <host name="192.168.1.1"/>?
etc



More information about the wpkg-users mailing list