Attribute Value Description
Path path Fully qualified path of the executable file. If
110
Attribute Value Description
use double quotation marks as shown in the following example:
"\\server\share\Office 14\copylogs.bat"
QuietArg string String of arguments to be appended to the
command line if you configure a silent installation. For more information about when to use the QuietArg attribute, see the Remarks section that follows this table.
Args string String of arguments to be passed to the
executable. For information about when to use the Args attribute for chained
installations, see the Remarks section, following this table.
If the value of the Args element includes quotation marks, you can enclose the whole value in single (') quotation marks, as shown in the following example:
Args='"/param value"'
ChainPosition Before This command is executed before the
primary product installation.
After (default) This command is executed after the primary product installation.
Wait mseconds When you install a product with the Display
element Level attribute set to "full" or “basic,” this is the number of milliseconds to wait after you run the program before you continue the installation. The default is 0 (zero), which indicates no waiting. Execute Install (default) Setup executes this command when the
primary product is installed.
Uninstall Setup executes this command when the primary product is uninstalled.
Platform x86 (default) Specifies that this program requires the Intel x86 platform. This command runs only if the computer on which the installation is run matches this platform requirement.
111
Attribute Value Description
x64 Specifies that this program requires a 64-bit processor that supports the x64 extensions to the x86 architecture. This command runs only if the computer on which the installation is run matches this platform requirement.
Remarks
The Command element in the Config.xml file and the Add installations and run programs option in the OCT (command-lines entered in the Add Program Entry and Modify Program Entry dialog boxes) are intended to be used only for initial product installations and uninstallations. The Command element commands are processed only during initial installations and uninstallations. If Command element commands are used for customizations after the initial installation, they are ignored.
The command line can be specified to run an arbitrary command or to run a lightweight executable that you want to run when this product is installed.
The Command element in Config.xml and the Add installations and run programs option in the OCT do not provide the software deployment capabilities that an enterprise software deployment and
management tool provides, such as the ability to track deployment progress and troubleshoot problems. Therefore, we recommend that you use the Command element in Config.xml and Add installations and run programs in the OCT to run only lightweight executables or arbitrary commands that will not change the computer or that do not require user input. For example, you can run a utility to copy logs or a command to launch a Welcome page at the end of installation.
Important:
Chaining is not as reliable as installing each product separately. For example, if you chain two installations together and one of the products fails or encounters an unexpected error, the primary installation and the chained installation might not be completed successfully. Therefore, we recommend that you do not use the chaining approach. The recommended method for installing multiple products together in enterprise environments is to use a deployment management program, such as Microsoft System Center 2012 Configuration Manager or Microsoft Systems Management Server (SMS) 2003, or a third party tool, instead of chaining. The use of Args and QuietArg is as follows:
The Args attribute is always appended to the command. This can include switches such as "/install" or "Company=MyCorporation."
The QuietArg attribute is also appended if setup is running silently (with Display set as Display="none"). In such cases, you can specify the QuietArg attribute by using the "/quiet" switch, for example, you can use: QuietArg="/quiet".
112 Setting the Wait attribute to 0 milliseconds indicates no waiting after you run the program before
you continue the installation. The command will execute and move on immediately.
Return codes are only respected if the Wait value is nonzero. If you specify 0, Setup will not wait to continue the installation after it runs the specified program. Therefore,, there is no return code to report in that case.
Setting the Wait attribute to any positive nonzero value will wait exactly the number of milliseconds you specify. If the process ends earlier than the specified time, setup will continue. If the process has not ended when the specified time is up, setup will fail.
Setting the Wait attribute to -1 indicates to wait indefinitely. This can be problematic because if the command process stops responding (hangs), setup will stop responding and will wait indefinitely for the command to run.
If there are two or more Command elements in the Config.xml file, they run in the order in which they are specified in Config.xml.
Examples
<Command Path="\\server\share\myscript.exe" Args='/id "123 abc"' QuietArg="/q" Wait="30000" />