Run External Process
Description
This functor runs an external *.exe, *.cmd or batch process.
Inputs
Name | Type | Description |
---|---|---|
File Name | String Type | The executable *.exe or *.com file name. If you are using a long file name containing a space, use a double-quoted string. |
Parameters | String Type | Process execution parameters. |
Optional Inputs
Name | Type | Description | Default Value |
---|---|---|---|
Wait Process Completion | Boolean Value Type | If true, the model waits for termination of the process. Otherwise, the model runs parallel to the process. | True |
Seconds to Wait | Integer Value Type | The model waits this value (in seconds) to resume. If zero, the model waits for the the process to terminate. | 0 |
Outputs
None.
Group
Notes
The new process runs in the same Dinamica EGO security context.
If the given file name does not contain an extension, “.exe” is appended. Therefore, if the file name extension is “.com”, this parameter must include the “.com” extension. If the file name ends in a period “.” with no extension, or if the file name contains a path, “.exe” is not appended.
If the file name does not contain a directory path, the system searches for the executable file in the following sequence:
- The current directory;
- The current directory for Dinamica;
- The 64-bit Windows system directory;
- The 32-bit Windows system directory;
- The 16-bit Windows system directory;
- The Windows directory.
To run a batch file or a command prompt, you must start the command interpreter; set File Name to cmd.exe and set Parameters to the following arguments:
/c PROMPT_COMMAND_OR_BATCH_FILE_NAME
Where PROMPT_COMMAND_OR_BATCH_FILE_NAME is the command which you want to execute or the complete path and file name of the batch file.
The output produced by the process is shown as “info” in the message log, but only if and while the application is blocked waiting for the process execution to complete.
Any error output produced by the process is shown as “error” in the message log, but only if the execution of the process itself ends in a error. Otherwise, the error output is ignored.
Internal Name
RunExternalProcess