Sr. Software Developer
Original Message:
Sent: 07/18/26 07:13 PM
From: Ahmad El sheikh Ali
Subject: Send Keys returns "Access is Denied" when RDP Session is inactive - IBM RPA
Hi Tarcio,Thank you for the detailed and helpful response.1. Regarding Send Keys:That makes sense now. I will try the preventSleep command as a quick fix, and I will also request the IT team to configure the Windows session lock policy on the RPA server to prevent it from locking during long-running processes.2. Regarding UI Recorder:My application is a WPF desktop application. I will try running IBM RPA Studio with administrator privileges and test if the Recorder can detect the elements.I will also configure WDG.Automation.AgentHost.exe to run with administrator privileges for the Control Room execution.I will update this thread with the results.Thank you again for your time and support.
------------------------------
Ahmad El sheikh Ali
RPA Developer | RPA - Robotic Process Automation
ValleySoft
Kafr El Sheikh, Riyadh Center, Al-Hajj Youssef Vil
01024285083
------------------------------
Original Message:
Sent: 07/17/26 04:01 PM
From: Tarcio Alonso Mota
Subject: Send Keys returns "Access is Denied" when RDP Session is inactive - IBM RPA
1. SendKeys
This is completely normal and expected behavior.
What you can do is configure your VM not to lock the Windows session or increase the time before it locks.
From an IBM RPA perspective, there's the preventSleep command, which runs in the background and constantly moves the mouse pointer to try to "bypass" Windows' idle control. It's not 100% guaranteed to work, but it's worth a try.
In my opinion, the best approach is still to change the Windows policies to disable session lock or increase the time before the session locks.
3. UI Recorder
There are a few possibilities.
If your application runs with administrator privileges, IBM RPA Studio will not be able to locate the elements in that application's window.
In that case, you would need to run Studio with administrator privileges as well to gain "access" to the elements of that application.
To run the robot via Control Center, you'll need to configure WDG.Automation.AgentHost.exe to run with administrator privileges as well, so that it has access to your application's windows.

UI automation depends on the application having a layer that allows for this integration.
For security reasons, some applications do not provide the information needed for automation to work (e.g., Chrome security pop-ups).
Other applications are built using development frameworks that also "hide" elements programmatically (e.g., an element is only "accessible" when it receives focus).
There are other factors as well.
For example, if you have a Java application and the app's window is highlighted in green on Recorder instead of red.
In that case, you need to enable the Java Access Bridge (another link) on your VM.
------------------------------
Tarcio Alonso Mota
Sr. Software Developer
IBM
------------------------------
Original Message:
Sent: 07/17/26 03:36 PM
From: Ahmad El sheikh Ali
Subject: Send Keys returns "Access is Denied" when RDP Session is inactive - IBM RPA
Hi Tarcio,Thank you for your response.1. Regarding the session lock:To clarify the Send Keys issue further - the script actually works fine when running from the Control Room (Unattended mode).The problem only happens in this specific scenario:- I connect to the RPA machine via Remote Desktop (RDP)- I run the script manually from IBM RPA Studio- The RDP session disconnects or goes idle during execution- At that point, Send Keys fails with "Access is denied"The reason the session goes idle is that the script was waiting for a long-running SSH process to complete (could take 1-2 hours). During this wait, there is no UI interaction happening, so Windows locks the RDP session.So the root cause is that Send Keys loses its Windows context once the RDP session is disconnected or locked.2. Regarding terminalSshConnect:I have already tried both "Normal" and "Application" values for --cursorkeysstate but the result is the same "Terminal is disconnected" in both cases.I will check the documentation link you shared.Could this still be a known bug in version 30.0.2?3. Additional question:Have you ever faced a situation where you are working on a Desktop automation project and you try to capture a specific UI element using the Recorder, but the Recorder simply cannot see it?For example:- A button that the Recorder does not detect- An input field that is invisible to the Recorder- The element exists on screen but the Recorder cannot capture it at allIf yes, what was the reason and how did you solve it?Thank you for your support.
------------------------------
Ahmad El sheikh Ali
------------------------------
Original Message:
Sent: 07/17/26 02:16 PM
From: Tarcio Alonso Mota
Subject: Send Keys returns "Access is Denied" when RDP Session is inactive - IBM RPA
That's strange.
How did the Windows session go idle if the automation is running?
As long as something is happening on the computer, Windows won't lock the session.
But anyway, if the session is locked, IBM RPA really won't work, because any action that IBM RPA sends to Windows won't be processed, since the session is locked.
As for the terminal, I understand now.
Try using a different value for the --cursorkeysstate parameter. If that doesn't work, then it might be a bug.
I don't know why there are two commands for accessing SSH server, but I've noticed that they use different components.
Perhaps one of them is designed for a specific type of SSH terminal.
https://www.ibm.com/docs/en/rpa/30.0.x?topic=connection-connect-terminal-via-ssh
Na verdade
------------------------------
Tarcio Alonso Mota
Sr. Software Developer
IBM
------------------------------
Original Message:
Sent: 07/17/26 12:59 PM
From: Ahmad El sheikh Ali
Subject: Send Keys returns "Access is Denied" when RDP Session is inactive - IBM RPA
Hi Tarcio,
Thank you for your response. Please find my answers below:
- Regarding Send Keys Issue:
IBM RPA is running on the Jump Server itself, and Send Keys
is targeting an application on the same Jump Server.
The issue occurs when the RDP session to the Jump Server
becomes inactive or locked.
Please see Screenshot 1 for the exact error. 
2. Regarding terminalSshConnect vs executeSSH:
- SSH Login command works successfully and returns
a valid SSH connection object.
- Connect to Terminal via SSH always shows
"Terminal is disconnected" immediately,
even with correct credentials (Server, Username,
Password, Port ).
- Please see Screenshot 2 for the Terminal window
and Screenshots 3 & 4 for both command configurations. 
-L.png)

The difference is:
- terminalSshConnect → Opens Terminal Window inside
IBM RPA Studio → Always disconnected ❌
- executeSSH → Sends commands directly via SSH
without Terminal Window → Works successfully ✅
3. Regarding the Terminal is disconnected message:
This message appears inside the IBM RPA Terminal
window in the Designer view, not in the script logs.
IBM RPA Version: 30.0.2
Thank you for your support.
Ahmad El Sheikh Ali
------------------------------
Ahmad El sheikh Ali
------------------------------
Original Message:
Sent: 07/17/26 07:13 AM
From: Tarcio Alonso Mota
Subject: Send Keys returns "Access is Denied" when RDP Session is inactive - IBM RPA
Hi Admad.
Regarding the sendKeys issue, are you trying to send the command to an application on the same VM where IBM RPA is running, or does that VM establish an RDP connection to another VM, and are you trying to send the command to that other RDP session?
As for the terminalSshConnect issue, it simply connects to the terminal, so I don't think a banner would cause the connection to fail. But I don't understand how the executeSSH command would solve anything. After all, if IBM RPA isn't connected to the terminal, how would executing a command (sending something to the same terminal where the connection failed) solve the problem? Does this message "Terminal is disconnected" appear in the terminal screen, or does the IBM RPA command fail with this error message? Do you have any screenshots or logs (preferably at the INFO level)? Which version of IBM RPA are you using?
------------------------------
Tarcio Alonso Mota
Sr. Software Developer
IBM
------------------------------