Skip to main content

Windows applications

Before a developer can add an application project item to Pega Robot Studio, the developer must first consider the type of application to be automated. One of the most common application types added to robotic automation is a Windows application. A Windows application runs locally on your machine instead of a web application that is browser-based and runs on a server.

A developer must understand both how and when a Windows application is launched to configure the application project item properties. Common Windows applications properties are:

  • Path
  • TargetPath
  • StartMethod
  • StartOnProjectStart

Path property

For Pega Robot Runtime™ to launch the Windows application, the Path property must be configured with the full path to the application.

If the application is not in the system PATH, you must enter the full directory path for the application. For example, if the added Windows application is a customer relationship manager (CRM) and installed in the Program Files directory of your computer, you would enter C:\Program Files (x86)\CRM\CRM.exe.

If the folder where the application is located is present in the system PATH variable, a developer might enter the application executable name without the full directory path. For example, the folder where the Windows notepad application is installed is present in the system PATH, so when configuring the Path property in Pega Robot Studio, you enter only notepad.exe in the Path property.

Regardless of the scenario, the Path property is required when adding a Windows application to Pega Robot Studio.

The Path property does not support links (.lnk), wildcards, or regular expression (regex) text entries.

TargetPath

The TargetPath property references an application that is launched due to one or more other processes (applications) occurring first. For example, in a user’s normal workflow, a .CMD file is used to launch an .EXE file. To automate the EXE application, configure the application with the TargetPath property because it was not launched directly by the user but by another process.

When configuring a Windows application with the TargetPath property, you set the TargetPath value to the executable you wish to automate and set the Path property value to the executable which starts the target application. In the previous example, the Path property is set to the CMD file and the TargetPath property to the EXE file.

To use the Path/TargetPath relationship, set the StartMethod property to StartAndWait. When using the Path/TargetPath relationship, you cannot interrogate the application listed in the Path property. You can interrogate only the TargetPath application.

Note: Java-based applications use this configuration often.

StartMethod property

The StartMethod property defines how Pega Robot Runtime interacts with the application. Options include:

Option

Description

Start

Default value. Tells Pega Robot Runtime to launch and hook the application defined by the Path property.

StartAndWait

Tells Pega Robot Runtime to launch the application identified in the Path property, wait for the TargetPath application to launch, and then hook the TargetPath application.

Note: Pega Robot Runtime does not hook the Path application when this option is selected. As a result, you cannot interrogate or automate the Path application.

MonitorAll

Tells Pega Robot Runtime to wait for the application identified in the Path property to run, then hooks the application. With this option, Pega Robot Runtime does not automatically launch the Path application; the automation developer or the end-user is responsible for launching it. Once the application launches, Pega Robot Runtime hooks the application.

When using MonitorAll, the full path does not need to be specified in the Path property. Only the name of the executable is required.

Note: If the application identified in the Path property shuts down because of an application error or an end-user closing the application, MonitorAll allows Pega Robot Runtime to hook the application again when the application is restarted through an automation or by the end-user.

StartOnProjectStart property

Use the StartOnProjectStart property to determine whether the application launches automatically when the project starts. The default setting for this property is true.

If StartOnProjectStart is set to false, the developer is responsible for starting the application in an automation. The Path and TargetPath applications do not launch when the project starts, regardless of the StartMethod property.

A common usage of this property is to control the login process and application startup time for end-users.

Check your knowledge with the following interaction.


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice