Changes

Jump to: navigation, search

Packages.xml

1,212 bytes added, 18:34, 23 February 2018
Actions: added Download definition example from v1.1.0 notes. https://wpkg.org/files/beta/Changelog-1.1.0-M4
The '''install''' commands are executed by WPKG when a new package comes into scope for a profile.
The '''upgrade''' commands are executed when a new revision of a package comes into scope. That is, when the '''revision''' number in the '''[[packages.xml''' ]] file on the server is larger than the one in the local '''[[wpkg.xml''' ]] file. Note that the upgrade commands will be run even if the check conditions are already met.
The '''downgrade''' commands are executed if the version installed on the client is newer than the one on the server side.
The '''remove''' commands are executed when a package is removed from a profile.
The '''download''' commands are always executed when used on the global package level. Since WPKG version 1.1.0 however, this command is also allowed as a sub-node of any of the other commands. This allows you to specify a '''download ''' which is only downloaded for a specific command. This was implemented since it usually makes no sense to download the installation package again right before the '''remove ''' commands are executed (which usually runs a local uninstall command which does not need the original installer). '''Note:''' If multiple install (or upgrade/downgrade/remove) commands are specified WPKG will download the the files of all command nodes of the same kind before starting to execute the commands in sequence.
In many of the examples in the [[:Category:Silent_Installers]] section, <code>cmd.exe</code> is executed to perform environment variable expansion and to use <code>start /wait</code> to wait on the command being executed. This method of executing commands results in CMDwindows CMD windows appearing on screen. However, this method does not appear to be necessary. The current version of WPKG executes commands using the <code>WScript.Shell.Exec()</code> function and expands environment variables before execution. WPKG then waits until the command is completed before continuing.
The correct method of executing a command interpreter is to use the <code>%comspec%</code> environment variable, not specifying <code>cmd.exe</code> explicitly. This is needed to run commands that are built into the interpreter and are not separate executables.
* postponed - reboot once all the packages have been processed
'''Download''' definitions can be specified as follows:<source lang="xml"><download url="http://example.org/package.exe" target="subdir/package.exe" timeout="7200" /><install cmd="%TEMP%\subdir\file.exe some arguments" ...> <download url="http://example.org/file.exe" target="subdir/file.exe" /></install><install cmd="%TEMP%\subdir\file2.exe some arguments" ...> <download url="http://example.org/file2.exe" target="subdir/file2.exe" /></install><upgrade cmd="%TEMP%\subdir\update.exe arguments" ...> <download url="http://example.org/update.exe" target="subdir/update.exe" /></upgrade></source> This definition will simply download <code>package.exe</code> (global command). <code>file.exe</code> and <code>file2.exe</code> are downloaded right before their parent '''install''' commands are executed, in sequence.  In case of '''upgrade''', it will download <code>package.exe</code> (global command) and <code>update.exe</code> before executing the '''upgrade''' command(s). Please note that the <code>target </code> value for a '''download ''' action is always relative to the <code>downloadDir </code> defined in [[wpkg.js ]] (and there's currently no configuration option to change this from the default of <code>%TEMP%</code>). The <code>timeout</code> value also defaults to the <code>downloadTimeout</code> defined in [[wpkg.js]] (or [[config.xml]]), 7200 if not omitted.
==Action conditions==
5
edits

Navigation menu