[wpkg-users] wpkgCreateReport Update

Rainer Meier r.meier at wpkg.org
Sat Aug 22 21:20:41 CEST 2009


Hi Mark,

Mark Nienberg wrote:
> I tested with the "Execute After" command and could not get it to work
> correctly.  In my case the share where I need to copy the file is a
> samba share and I don't really want to make it world writeable.  It
> appeared from my testing that wpkg tried to connect using the SYSTEM
> account, which has no password and no account on the samba server.

You could specify a cmd script in the "Execute After" setting which maps the
share using a specified user/password. It's not really secure unless you protect
the script not to be readable by local users.


> Eventually I decided to do the copy as a wpkg package with "Execute
> Always", so the user/password specified in the client is used instead of
> SYSTEM.  This has the disadvantage that it might be out of date by one
> reboot, unless someone can tell me how to make this package execute last.

You might use the latest 1.1.2-RC* release. It includes a change which writes
changes to the local settings (wpkg.xml) right after the modification instead of
just when wpkg.js exits. As a result if you put an execute=always package at the
end of each run it will copy an updated wpkg.xml.

In order to run it "at the end" you must specify the lowest priority value for
this package.

My package simply looks like this:
<package id='WPKG-XML' name='WPKG XML backup' revision='1' priority='10'
reboot='false' execute='always' >
  <!-- Backup copy of WPKG XML files -->
  <install cmd='"%SOFTWARE%\path\to\wpkg-xml\copy-xml.cmd"' />
  <upgrade cmd='"%SOFTWARE%\path\to\wpkg-xml\copy-xml.cmd"' />
</package>

Where the script is as simple as follows:

@echo off

copy %SYSTEMROOT%\system32\wpkg.xml \\host\share\wpkg-xml\%COMPUTERNAME%.xml /y

exit 0


Well, you might add explicit credentials to access the server.

br,
Rainer



More information about the wpkg-users mailing list