Hi Chris, Chris Allen wrote: > I'm lost as to how the tools folder is supposed to work. The > documentation seems to indicate that when using wpkg.js any EXEs in > tools would automatically be available for use in the package definition > files, but this is not the case. > > Here's what I've tried: > > * First I copied the tool I want to use: nircmdc.exe to tools > > * I then edited packages\putty.xml and put a line that calls nircmdc.exe > in it like so > / <install cmd='nircmdc.exe ...' />/ > > That didn't work. Then I tried this: > / <install cmd='tools\nircmdc.exe ...' />/ > > Then this: > /<install cmd='%WPKGROOT%\tools\nircmdc.exe ...' />/ > > But that doesn't work either. I thought maybe %WPKGROOT% would > automatically be set in the installers environment, but it's not. What > is the point of the tools folder? It seems entirely pointless to me if > I have to set up a system wide WPKGROOT environment variable myself to > get to programs I put in tools. Currently the tools folder is used by WPKG only for one purpose - in case /rebootcmd:special is used it will run tools\psshutdown.exe from this folder. So the folder is used to put some WPKG tools into it. Well, the example within README.TXT shows what you're describing - it shows a 'wget' command but the example will not work (at least not with current WPKG implementation) unless WPKG would be executed within this directory. There is no WPKGROOT variable set (at least not to my knowledge) but of course you're absolutely free to define one in WPKG client which is then available to all your packages (that's the way I would recommend it). In order for the example command to work the tools folder would have to be added to the PATH. I think you might be able to achieve this by appending the path to the PATH environment variable. I did not try if adding a variable named PATH with the value "\\server\share\wpkg\tools;%PATH%" to the variables within WPKG client. However I verified that such UNC paths are correctly searched by Windows if the PATH is extended like this manually. So you might be able to extend the path using WPKG client or even by adding the PATH extension to profiles/packages/hosts (using variables). I am really not sure if the examples ever worked with any WPKG version. I doubt because I don't remember that old WPKG versions used the tools directory as the working directory or extended the PATH automatically. So the tools directory was always just used for some WPKG-internal tools - or to place tools there which are referenced by absolute paths. The only way to do this properly would be to extend the PATH variable as I wrote above and I think the best location to do so would be WPKG client. Especially because WPKG supports to specify a working directory for each command - so the commands might actually be run from any directory. So the only way to assure that the tools are always found if not specified by absolute paths is to add the folder to the PATH. br, Rainer |