[wpkg-users] Set variable based on Computer Name

Michael MacKay dmmackay at gmail.com
Fri Jan 6 00:03:51 CET 2012


I have 10 locations I am using WPKG with and use some syncing software to
deploy the WPKG directory to all the locations.  Currently, I have the WPKG
Clients on each workstation have the %SOFTWARE% location variable and
wpkg.js directed to the local server, so all the files in the WPKG
directory are common across all locations.

I would like to set it to allow a local initialization of wpkg.js but when
I run it from a batch file it doesn't have the %SOFTWARE% variable so can't
find the installers.

I use a common hostname structure; Each office has a unique first four
characters on all system, with the server having only the four characters.
SO when I run this on any client it will pull the script.

set SERVER=%computername:~0,4%

cscript //%SERVER%/WPKG/wpkg.js /synchronize



Unfortunately, it doesn't have the WPKG variable for the software path as
that is in the WPKG Client.  Is there a way to set a WPKG variable based on
the first four characters of the hostname?  Then I could build that into
the package.xml and can run the wpkg.js without the client which would
allow me to troubleshoot easier, as well as manually start wpkg to  install
on systems without rebooting. I am sure it wouldn't be hard, I just don't
know javascript at all...

Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120105/8b04f027/attachment-0001.html>


More information about the wpkg-users mailing list