[wpkg-users] setting variables depending on hostnames

Chris Mortimer cm214 at cam.ac.uk
Tue Nov 29 05:27:57 CET 2011


Hello Peter,

Personally, I would have a central text file (on the wpkg server) that contains lines like:

Hostname:serial number

I'd then write a script that would be run before the Acrobat install line in your xml file. This script would read through the central text file, looking for the provided hostname - first argument to the script, and return the serial number. If this script is ran for a dos For command, you could then assign the serial number to a variable which you'd then add to your Acrobat install line. Yes, it would require writing something to do some file reading and return a value but at least you can use the same xml file everywhere and maintain one central config file. 

Chris Mortimer

Computer Officer
Department of Applied Mathematics and Theoretical Physics,
University of Cambridge,
Wilberforce Road,
Cambridge. CB3 0WA
Tel: 01223 760374


-----Original Message-----
From: Peter Beck <peter at datentraeger.li>
Sender: wpkg-users-bounces at lists.wpkg.org
Date: Tue, 29 Nov 2011 01:46:07 
To: <wpkg-users at lists.wpkg.org>
Subject: [wpkg-users] setting variables depending on hostnames

Hi guys,

is it possible to set different values for a variable depending on the 
hostname ? I have different installations for Acrobat 8 each with its 
own serial number. Now I'd like to read all of these serials within the 
package or even better from the profile-definitions (I think it would be 
better to set the serials in a company-based profile to "isolate" the 
serials from different companies but using the same package everywhere...)

something like this "idea":

   <check type="host" condition="hostname" value="host1" />  -> serial1
   <check type="host" condition="hostname" value="host2" />  -> serial2
   <check type="host" condition="hostname" value="host3" />  -> serial3

If it's just on serial for a customer, I am using a variable in a 
company-based profile.xml, but with different serials for the same 
package, it's a little bit confusing ... ;-)

How do you guys handle such issues ?

Thanks
Peter
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


More information about the wpkg-users mailing list