How to Start a Program in the Front

book

Article ID: 110931

calendar_today

Updated On:

Products

CA Process Automation Base

Issue/Introduction

"Run Scrip" operator can be used to start a program in a target machine, the program will be started in the background and the end user won't noticed it, which is useful for several tasks, but if there is a need to start the program in the front, there are some changes that must be made.

Environment

Process Automation 4.3.x

Resolution

Windows's tool called "Interactive Service Detection" manages how a program can interact with the desktop, showing application in the front or leaving them in the background.


Before running the instance, the following changes must be made in the target machine:


1. In Services.msc, make sure that "Interactive Services Detection" is started and running.

2. In Windows 8 or above, starting "Interactive Services Detection" service will throw error as (Interactive Services Detection “Error 1: Incorrect Function").

3. To resolve above error, Go to the 'Start' menu and in the search box type “regedit”, then go to CurrentControlSet\Control\Windows , change value of "NoInteractiveServices" from 1 to 0. (based on: https://blogs.technet.microsoft.com/home_is_where_i_lay_my_head/2012/10/09/windows-8-interactive-services-detection-error-1-incorrect-function/ )

4. Now start the "Interactive Services Detection" service and the error will be resolved.

5. Restart PAM.


Now, the target machine will be ready to to start any program in the front, the following example can be used:


Operator "Run Script":


- Script extension: .bat

- Inline Script:


echo off

start "" "C:\Windows\System32\notepad.exe"

exit


When the above instance runs in a target machine, the following message will appear in ends user's Desktop:




When the End User click on "View the message", the program will be shown as follow:


 

Once the End User closes the program, the process instances will finish too.

Attachments