How to Start a Program in the Front

Document ID : KB000110931
Last Modified Date : 13/08/2018
Show Technical Document Details
"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.
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: )
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"

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

User-added image

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

User-added image

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