[wpkg-users] Tools Folder Not Working

Chris Allen callen at katmairesearch.com
Fri Jun 5 22:29:34 CEST 2009


After weighing the pros and cons of different solutions I decided to go with
creating a GPO that contains system wide environment variables one of which
is %TOOLS% that I linked to an OU containing all the computers I use WPKG
on.  I'm lucky in that my domain is running at 2008 Domain Functional Level,
which means that I get all the new bells and whistles 2008 domains offer,
one of which is Group Policy preferences.  In order to take advantage of GP
preferences you must have the client side extensions add-on loaded (this
applies to XP and VIsta).  GP preferences removes the need for a lot of what
I used to do in startup/login scripts.  Here's a sample of what you can set
in GP preferences:

* Environment variables

* File copying

* INI file changes

* Registry changes

* Shortcuts

* Setting up Network shares & mapping shares

* Local user/group changes

* Service changes

* Printer additions

and the list goes on...  Not trying to sell 2008, but I've been working with
Windows domains for quite a number of years now and this is the biggest
baddest upgrade yet.  IMO it's definitely worth the $$$.  :-)

In anycase, after %TOOLS% is defined on each system through my GPO, I can
then do the following in packages.xml
*
<install cmd='%TOOLS%\nircmd.exe ...' />*

This insures that my tools work within WPKG client and when I call wpkg.js
directly.  It also has the benefit of being defined in only one place.

Thanks again for your help Rainer.



On Thu, Jun 4, 2009 at 1:38 PM, Rainer Meier <r.meier at wpkg.org> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20090605/27e48c0c/attachment-0002.html>


More information about the wpkg-users mailing list