Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Orchestrator, System Center 2012 - Orchestrator, System Center 2012 R2 Orchestrator
The Run Program activity runs any program or command on any computer in your domain in interactive or background mode. Use this activity to run backup applications or a batch script that runs a set of complex commands.
Before you configure the Run Program activity, you need to determine the following:
The command line argument or program that will run and which computer it will run on.
You also need to determine whether a user on the target computer will need to interact with the program when it is run. The user account that will run the program or command must have administrator rights to run programs on the target computer.
Use the following information to configure the Run .NET Script activity.
Select this mode to run a program in the same way as a Windows shortcut or the Windows Run dialog box. You can also use the ellipsis (...) button to browse for the computer.
Select this mode to run a command in the same way as the Windows Command Prompt.
Type the computer where this program or command will run.
Type the parameters that will be passed to the program that you want to run. This option is only available when you select the Program execution mode.
Type the full path of the working folder that the program or command will use. The command or program will behave as if it was run from the working folder.
Select one of the following execution options for the program:
Wait for the completion of the program
Select this option to cause the Run Program to wait for the program or command to finish running before moving to the next activity in the runbook. If you have set the Execution mode to Interactive, then the user must close the program before the Run Program activity is able to move to the next activity in the runbook.
Type the maximum number of minutes to wait for the program or command to complete. Set this value to 0 to have the Run Program activity to wait indefinitely for the completion of the program or command. If the time has expired and the program or command has not completed running, the Run Program activity will shut down the program or command and report a failure.
Do not wait for the completion of the program
Select this option to cause the Run Program activity to run the program or command and not wait for it to complete. When this option is selected, the published data items generated by the Run Program activity will not be available to other activities.
To use a different account name to log in to a computer and run a program, type the account number in the User name box.
Type the password associated with the user name to run the program on the remote computer.
The following table lists the published data items.
The program path or command that was entered.
The parameters that were passed to the program. This option is only available when Program run is selected on the Details tab.
Working folder path
The path of the working folder.
The process ID of the application that was started when the Run Program activity runs. If you are using Command run, this will be the process ID of the Windows Command Prompt application.
Program exit code
The return code of the application that was run by the Run Program activity.
The name of the computer where the application was started.
The text that was sent to the console when the program was run.
The unmodified output of the program.
Program output file
The name of the local file where the program output was saved.
UNC program output file
The name of the file where the program output was saved in UNC format.
The Run Program activity is based on PsExec. PsExec lets you execute processes on other systems, complete with full interactivity for console applications. For more information on PsExec, go to PsExec.
The Run Program activity inherits certain security concerns from PsExec. Specifically, PsExec uses named pipes. This can be a security concern, as credentials can be sent through this tool.
A work-around for customers concerned about security vulnerabilities is to create a mapped drive to the server that is the target of the Run Program activity. This establishes a security context for the Run Program activity.