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.
Product(s): Workload Automation System Agent
OS: Windows OS
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.
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.
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