[wpkg-users] Copying exe's to systems

Rainer Meier r.meier at wpkg.org
Thu Oct 30 19:50:48 CET 2008


Hi Tim,

Tim Wolak wrote:
> I am new to wpkg and I have executables that can change on a daily or
> weekly basis that need to be rolled out to systems.  There are no msi
> files that need to be run, how can I get wpkg to just copy the files
> onto the systems?

Sounds like an easy job.
Just create a package (any name will do) and specify an install and
upgrade command like "copy <source path> <destination path>", you might
specify multiple commands like this.

Of course you can also write a batch file (*.cmd script) which does the
file copy for you and let WPKG use this script as an install/upgrade
command.

Then another question is how often WPKG should execute this
install/upgrade script. If it should be run on every WPKG
synchronization just specify execute="always" as an attribute to the
package definition. So WPKG will run the install commands on each WPKG
invocation.


Assuming that you want to re-copy the files only if you did some updates
on the server side I suggest something like this:

[any-name].xml:

<?xml version="1.0" encoding="utf-8" ?>
<packages>

<package id='[any-name]' name='[any-name]' revision='1' priority='50'
reboot='false' >
  <check type='file' condition='exists' path='c:\path\to\file' />
  <install cmd='"%SOFTWARE%\path\to\install.cmd"' />
  <upgrade cmd='"%SOFTWARE%\path\to\install.cmd"' />
  <remove cmd='"%SOFTWARE%\path\to\install.cmd"' />
</package>

</packages>

You might enhance the checks to check for file size or version
(depending on file properies) in order to verify that the files have
been copied. But at least you should check for file existence.

Now you just need to verify install.cmd to copy the updated files and
then increase the version number within the "revision" attribute. WPKG
will then execute the upgrade command (again the same copy script) on
next run.

As long as the checks are still "true" WPKG will not execute install.cmd
on each run as long as you do not increase the revision number. Instead
WPKG just verifies the checks and skips the package then. As written
above you might even use WPKG to actually verify all files, their sizes
and correct version if you enhance the checks accordingly but for most
cases it will be enough to check if they exist.

br,
Rainer



More information about the wpkg-users mailing list