Changes

Packages.xml

99 bytes added, 18:07, 23 February 2018
m
Actions: <Code> Tags
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 cmd windows CMDwindows 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.
When the output of a command (think of: <code>copy</code>,<code>cacls</code>) is too much, the command will fail. You have to redirect the output to NUL or a file (example: "<code>%command% >nul"</code>).
Typical examples:
5
edits