Step Details | |
| Introduced in Version | 4.0.0 |
| Last Modified in Version | 7.12.0 |
| Location | Flow Management |
The Execute Command step runs a command executable on the server, similar to the Run Command Program on a File step. The main difference is that Execute Command does not require a file input; instead, it runs the executable specified in Command with optional arguments from ParameterString.
<AllowCommandExecutionInSteps>true</AllowCommandExecutionInSteps>Properties
Setup
| Property | Description | Data Type |
|---|---|---|
| Command | The absolute path to the command executable to run. Supported types include .bat, .cmd, and .exe. Network share (UNC) paths (for example, \\server\share\file.bat) are supported; mapped drive letters are not supported. | String |
| ParameterString | Optional command parameters, separated by spaces (for example, flags, arguments, or values accepted by the executable). | String |
| Get Command and Arguments from Flow | Retrieves the inputs for Command and ParameterString through the Flow. | Boolean |
Note: Relative paths are not supported for Command.
Outputs
| Property | Description | Data Type | |
|---|---|---|---|
| ErrorCode | Returned when the command fails to execute. | --- | |
| CommandErrorOutput | The error output produced by the command (stderr), when available. | String | |
| CommandOutput | The standard output produced by the command (stdout), when available. | String | |
| ReturnCode | The return/exit code produced by the executable, when available. | String | |
| Success | Returned when the command executes successfully. | --- | |
| CommandOutput | The standard output produced by the command (stdout), when available. | String | |
Example
The following example shows sample values for the Command and ParameterString inputs.
| Property | Example Value |
|---|---|
| Command | C:\Windows\System32\cmd.exe |
| ParameterString | /c echo Hello World >> C:\Examples\testing.txt |

Common Errors
Command execution is disabled
This error occurs when command execution is disabled for security reasons. Enable it in Settings.xml by adding (if missing) or setting the following tag:
<AllowCommandExecutionInSteps>true</AllowCommandExecutionInSteps>
Could not find the file specified
A standard error when utilizing the step is an incomplete or incorrect path to the executable. Ensure that the full path in Command is complete and includes the correct file extension, and that the path is accessible to the Decisions service account. This message can be found in the CommandErrorOutput.
