Running Interactive jobs on Windows using WA Agent
search cancel

Running Interactive jobs on Windows using WA Agent

book

Article ID: 29113

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent CA Workload Automation DE - System Agent (dSeries) CA Workload Automation AE - System Agent (AutoSys) CA Workload Automation DE - Business Agents (dSeries)

Issue/Introduction

The WA Agent can run jobs in interactive mode on Windows OS.  Interactive mode lets users view and interact with jobs that invoke Windows Terminal Services or user interface processes, for example, Notepad.

 

Environment

Product(s): Workload Automation System Agent
OS: Windows OS

Cause

This issue stems from programs that launch dialog windows, open application windows while performing tasks, and then close. 

Now, when a program requires user interaction (such as a dialog box, prompt, or application window), WA Agent requires an active user session as per Microsoft policy.  If the user in job does not have an active RDP session, the OS will not allow the Agent to run the job and return an error indicating that no user session is available.

Resolution

There are two options for resolving this problem. They are:
  1. User Login Approach:
    Have a user login via RDP each time the job needs to run or find a way to keep an RDP session open for that user (often considered a security risk); or
  2. Non-Interactive Solution:
    Redesign or modify the job so that it no longer requires user interaction, allowing it to run entirely in the background.

MSDN articles that discuss interactive programs in Session 0:

 

Option #1 Additional Information

If you are going to implement option #1 then the following parameter must be added to agentparm.txt

oscomponent.interactive=true 

 

Again, the user specified in the job must be logged in, via RDP, to the host where WA Agent is running. If the user is not logged in, the job will fail with this error

EXITCODE: 20013 TEXT: <Unable to locate interactive logon session>

 

Some jobs may still not run, such as MS Excel.  The user Desktop path and the <drive:>/Program Files/System32 must be add to the PATH environment variable.

E.g.

echo %PATH%

c:\Program Files (x86)\CA\SC\CAWIN\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;
C:\Windows\System32\config\systemprofile\Desktop

Note: The "C:\Windows\SysWOW64\" may also be added to the path.  Several MS Office binaries are 32 bit and will use DLLs from <drive>:\Windows\System32.

 

Additional Information

Historically, these types of programs ran in Session 0 — an isolated session invisible to users. However, Microsoft has restricted access to Session 0. 

Note:  User may need/create to add this directory if it doesn't exist

C:\Windows\SysWOW64\config\systemprofile\Desktop

 

Attachments

1558695930646000029113_sktwi1f5rjvs16n82.jpeg get_app
1558695928711000029113_sktwi1f5rjvs16n81.jpeg get_app