Execute Command Action

InstallAnywhere 2018

You can use the Execute Command action to run executable files as you would from the target system’s command line. The Execute Command action customizer has the following options:

Execute Command Customizer

Option

Description

Command Line

Enter the syntax to run the executable. Type the name of the executable (command) or the full path to the executable.

Any text following the command is passed as arguments to the executable.
Single arguments that contain spaces must be quoted; otherwise, they are passed as multiple arguments.
To pass actual quotation marks as part of an argument, escape them with a backslashes character—for example \".
All elements in Command Line may be represented either as literal values or by InstallAnywhere variables.

Do not substitute unknown variables

Select this option to avoid the substitution of unknown variables for this action by instructing InstallAnywhere to only resolve InstallAnywhere variables which are listed in the project under Project > Variables (the known variables).

Note • For more information, see Preventing the Substitution of Unknown Variables.

Suspend installation until process completes

Select this option if you want the installer to halt until the process launched by the command has returned.

Show indeterminate dialog

If you have chosen the Suspend installation until process completes option, select this option if you want the installer to render a dialog during the execution of this command and show the message you enter in the associated text box. The default message is Executing...

Store process's stdout in

Enter the variable to store the stdout from your command. The default value is $EXECUTE_STDOUT$.

Store process's stderr in

Enter the variable to store the stderr from your command. The default value is $EXECUTE_STDERR$.

Store process's exit code in

Enter the variable to store exit codes. The default value is $EXECUTE_EXITCODE$.

Suppress first window (Windows only)

Select this option to suppress the first window on Microsoft Windows platforms. This option is particularly useful in suppressing the appearance of the cmd.exe window when executing batch files, or command-line executable files.

Note • The Execute Command action is not the same as a DOS command (on Windows) nor a shell command (on UNIX). Only executable files on the target system can be called using this action. For example, on Windows, you cannot call echo because it represents a special shell command that cmd.exe and command.com understand. On UNIX, echo can be called because it is an executable file (typically located in /usr/bin); however, you cannot use any special shell commands (the setenv or set C-shell commands).

Note • To execute DOS or UNIX-shell commands, use the Execute Script/Batch File action or the Execute Target File action. These actions allow you to write a batch file or shell script to run during the installation.