Contact Us 1-800-596-4880

Run Program

This Action Step is used to run a program by directly calling its executable file.

Properties

Domain If a process is started with a specific user, this defines the domain of the user

Inherit Environment If process is started with a specific user, this determines if the environment will be inherited from that user

Interactive logon with profile If this option is checked additionally to the option UseCredentials, the user’s profile from the registry is passed on to the process.

Password If a process is started with a specific user, this is the user’s password. Only applicable if "Use Credentials" is set.

Use Credentials Determines whether to start the process with a different user or not

Username If a process is started with a specific user this is the user’s name. Only applicable if Use Credentials is set.

File name Contains the full path to the executable file that should be run

Parameters Defines additional command line parameters to use when running the program

Path is relative to 3rd Party Folder The related process will be started relative to the 3rd Party Folder. This folder must be below the scripts directory and can contain user-defined applications.

Start mode Sets the status of the application window (Normal, Maximized, Minimized)

Working Directory Defines the working directory of the process started

Timeout If Wait for window to appear is set, this defines how long the Action Step will wait for the window to appear

Use regular expression If Wait for window to appear is set, this setting defines whether the Window Title field contains a regular expression or not

Wait for window to appear Defines whether the Action Step should wait until the window appears

Window Title If Wait for window to appear is set, this defines the Window Title to wait for

Inbound Variables

File name

Working Dir

Parameters

Window TitleUsername

Password

Domain Process Window Handle The window handle associated with the newly opened window. (Only available if Wait for window to appear is set.)

Outbound Variables

Process ID The ID of the process that has been started

Executable The name of the executed file

Working Dir The working directory of the process

Wizard

Insert Environment Variable Select and use any defined environment variable as a path to the desired program file via the drop-down menu

Auto-Replace Variables If you have entered the path to the executable manually or used the browse button to specify it, you can click this button to check if there are any environment variables that can replace parts of the path

You can place an executable file in the 3rd Party Folder within the folder where the project is saved. To do so, use the Select & Copy File to 3rd Party Folder… function in the drop-down menu accessed by clicking the triangle symbol next to the browse button (…​).

This is very useful if, for example, you want to use a user-defined batch file in the Workflow. Using this function ensures that the executable file can still be found correctly, even when the project folder has been moved or deployed.

Select Open 3rd Party Folder to copy files into the folder yourself. If you use this option, remember to manually select the Path is relative to 3rd Party Folder checkbox and enter the filename to call too. Using Select & Copy… fills out the File name field and selects the checkbox automatically.

To select the program to run, enter the full path manually into the File name field or just browse to the executable file you want to run.

If you intend to use an Image search within the application when it is running, it is recommended that you use Maximized Start mode so the application window will always be in the same position! This makes defining a reliable Search area for the Image search much easier.

As mentioned above, you can use Windows environment variables in the File name and Parameters field. This can be done with both default environment variables defined by Windows and with user-defined environment variables.

These environment variables contain paths to certain folders. For example, Internet Explorer is often installed in C:\Program Files\Internet Explorer\ or C:\Program Files x86\Internet Explorer\. However, the folder might have a completely different name, depending on the language used with your operating system, or it might even be installed on a different hard drive. To help avoid problems, the environment variable %ProgramFiles% is set automatically to the correct folder when Windows is installed.

Here is a list of the most important environment variables:

  • %ALLUSERSPROFILE% The All Users profile folder

  • %APPDATA% The current user’s application data folder (Windows Vista and later only)

  • %COMPUTERNAME% The system name

  • %ProgramFiles% is replaced by the current program path.

This variable depends on whether you are running a 32-bit or a 64-bit program. If you are running a 32-bit program, C:\Program Files (x86) is the resulting variable. If you are running a 64-bit program, C:\Program Files is the resulting variable.

RPA Builder is usually run as a 64-bit program but the generated workflow code, on the other hand, is usually run as a 32-bit program. That is why the Test Button in the wizard can provide you with a different result than the actual run does later on.

To avoid possible differences when the programs are being run, it is therefore recommended to use:

  • the variable %ProgramFiles(86)% for 32-bit programs

  • the variable %ProgramW6432 for 64-bit programs. (This does not apply to 32-bit-only Windows installations.)

    • %SystemRoot% The system root folder

    • %SystemDrive% The system drive letter

    • %USERPROFILE% The current user’s profile folder

You will find a complete list of predefined environment variables by opening the drop-down menu Insert Environment Variable in the Run program wizard.

If you want to test the new Run program configuration, click the Test button and the executable will be run according to the configuration.