Run Action - Setting Properties

The Run action is used to start an application or open a document. This includes the option to open a console application in order to capture the output to a variable or file.

The 'Run' action can be set to wait until the specified application is ready for input, wait until it completes, or not wait at all. You can populate variables or a dataset with captured data from a particular window or process.

NOTE: Any variables used must be created in earlier steps using the Create Variable action.

To set properties of the 'Run' action:

  1. From the Task Builder Available Actions pane, open the System folder and double-click the Run action or drag it into the Steps pane. The properties window of this action appears as shown below:

  1. In the General tab, use one of the following ways to select the program, document or file to run:

 

  1. If you want the program to open only if it is not already open, enable the option labeled Run only if another instance is not running.

  2. If the window will not be in its normal state when the step runs (i.e. the window is currently maximized, minimized or hidden), select the applicable window state in the Initial window state drop-down. This is helpful, for example, when corresponding actions need to interact with the specified window.

  3. Certain applications, primarily legacy (older) applications, may require a startup folder. However, most newer applications do not rely on a startup folder. If the program or document you wish to run needs a startup folder, click the Open Folder button next to the Startup folder field and navigate to the startup folder or manually enter the full path to the startup folder.

  4. Click the Wait tab and make your selections according to the following "wait" guidelines:

When the Wait until application is ready for input parameter is enabled, the option Populate variable with the return code becomes available. To populate a variable with the process ID, select the corresponding check box and then manually enter or select the variable in the field below.

When the Wait until application ends parameter is enabled, the option Populate variable with process ID becomes available. To populate a variable with the return code, select the check box and then select or enter the variable in the field below.

NOTE: Not all applications use return codes, so this functionality may vary from application to application.

  1. The Data tab allows certain window parameters to be captured and saved to a variable or dataset. Make your selections according to the following guidelines:

NOTE: Dataset names must be alphanumeric, begin with a letter and contain no spaces.
 

  1. If you want the program to run as a document or as a console application, click the Advanced tab and make your selection from the Run application as drop-down. By default, this parameter is set to Standard Windows application.

When the option labeled Console application is selected, other parameters become available. If you want to capture the output of the console application to a variable or file, enter the properties as follows:

  1. To set the Description tab properties, please refer to Description Tab Options.

  2. To set the Error Causes and On Error tab properties, please refer to Step Error Handling.

  3. When finished, click OK to save settings and close the properties dialog window.

See Also

About Actions

Adding Task Steps

Run Action