Start-Program
Start-Program
Runs a command line or Windows program. The returncode is saved into a variable and can then be used further.
The command starts the specified program, start parameters are supported. The extension EXE must be specified, otherwise the Packaging PowerBench cannot recognize the parameters due to the support of long file names (long file names may contain spaces).
Settings:
- Command line
Name of an executable file (EXE file) including path and necessary parameters. Variables are allowed. Use the "..." button to select an existing file (on the packaging system) or enter the path manually. - Use a different working directory
If this option is activated, a working directory other than the application directory can be specified for the execution. - Text field for working directory
Path to the alternative working directory. The use of variables is possible. Use the "..." button to select an existing directory (on the packaging system) or enter the path manually. - Variable name for returncode
Optional - Name of a variable that holds the returncode of the called command line. If the command execution terminates with a timeout, the variable contains the return value TimedOut. Enter only the name of the variable, not the $ sign and the curly brackets. - Max wait time [min]
Time in minutes to wait for the process to be completed. If the process is not terminated within this time, package execution continues anyway and the variable for the returncode gets the value TimedOut. - Use 32-Bit mode on x64 computer
If the script is executed on a 64-bit operating system, the counterpart for 32-bit applications SysWOW64 can be used automatically when referring to the SYSTEM32 directory. - Do not Log command line parameters
The command or variable is not written to the log file. This option prevents sensitive information contained in the command line, such as license keys or passwords, from being read out via the log file.
Example:
The following example calls a setup program and will wait for a maximum of 3 minutes. The return value is stored in the variable _Returncode:
Corresponds to DSM eScript commands:
- Execute
- ExecuteEx
See also: