Changes

Packages.xml

11 bytes added, 16:29, 27 July 2010
m
improved readability
* '''reboot''' - specifies if and how the system reboots when installing, removing or upgrading a given package.
** true - always reboot after processing this package.
** postponed - reboot after wpkg WPKG has finished processing all packages, if the package checks are successful after the action.
** anything else - do not cause a reboot because of this package. Other packages may still cause a reboot.
Check conditions are broken down into 4 categories:
<ul><li>*'''Registry''' - Checks the registry for conditions</li><li>*'''File''' - Verifies various information about files within the filesystem</li><li>*'''Uninstall''' - Checks the software installation registry key (as displayed in Windows' Add/Remove Programs section) for the existence of an existing package</li><li>*'''Execute''' - Executes a script and checks the returning errorlevel (since WPKG 1.1.0)</ul>*'''Logical''' can also be used
'''===Registry'''===
Registry checks allow you to check for the existence of or a specific value in a registry key ('''Note''': for pre-1.0 versions,
it works on a registry value only, not a registry key!). Be ware Beware, there is a limitation of the RegRead method used by WPKG's Registry checks to query registry values which contain backslashes ('\'). See the [[Execute]] method section below to use instead to address this issue when needed
There are two possible conditions available for registry checks: ''exists'' and ''equals''.
'''===File'''===
File checks allow you to check for the existence of a file, check for a particular file's size, or examine version information about a file. There are several possible conditions available for file checks:
'''===Uninstall'''===
Uninstall checks allow you to check the Microsoft software installation registry keys (as displayed in Windows' Add/Remove Programs section) for the existence of a particular package. Microsoft maintains the list
'''===Execute'''===
Execute allows you to execute any script which checks if an application is installed. WPKG checks the exit code of the script to determine the existence of the particular software package.
</source>
'''===Logical Conditions'''===
There can be zero or more conditions verified during the existence checks. If no conditions are supplied, WPKG attempts to install the package regardless of whether it's currently
==Actions==
Wpkg WPKG understands several actions: '''install''', '''upgrade''', '''downgrade''', '''remove''' and '''download'''. Multiple commands for each of these actions can be listed in the config file and wpkg WPKG will execute them in the order they are listed.
The '''install''' commands are executed by wpkg 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 '''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, cmd.exe is executed to perform environment variable expansion and to use 'start /wait' to wait on the command being executed. This method of executing commands results in cmd windows appearing on screen. However, this method does not appear to be necessary. The current version of wpkg WPKG (0.9.10) executes commands using the WScript.Shell.Exec() function, which should expand environment variables. This isn't explicitly stated in the Microsoft SDK documentation, but seems to be the case. Wpkg WPKG then waits until the command is completed before continuing.
The correct method of executing a command interpreter is to use the %comspec% environment variable, not specifying cmd.exe explicitly. This is needed to run commands that are built into the interpreter and are not separate executables.
577
edits