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. <div>

<br></div><div>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.</div><div><br></div><div>
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. </div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>set SERVER=%computername:~0,4%</div></div><div><div><br></div></div><div><div>cscript //%SERVER%/WPKG/wpkg.js /synchronize</div></div>

</blockquote><div><div><br></div></div><div><br></div><div>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...</div>

<div><br></div><div>Thanks,</div><div>Mike</div>