Your agent's clicks stop when you minimize Remote Desktop or lock the screen
说明与用途
当 RDP 会话被最小化、断开或锁定时,GUI 自动化代理会失效,因为 Windows 停止绘制桌面。解决方案包括设置 RemoteDesktop_SuppressWhenMinimized、使用 tscon 将会话返回到控制台,或切换到 VNC 以保持桌面活动。
问题
GUI automation agents fail when the Remote Desktop session is minimized, disconnected, or locked, because Windows stops drawing the desktop and synthetic input has no target.
结果
Agents resume reliable operation when the desktop remains active, eliminating failures caused by minimized or locked RDP sessions.
工作流
- 1. Identify if the RDP session is minimized, disconnected, or locked.
- 2. If minimized, set the registry key RemoteDesktop_SuppressWhenMinimized=2 on the local machine (HKCU or HKLM).
- 3. If disconnecting, run the tscon command on the remote machine to return the session to the console without locking.
- 4. Alternatively, use a VNC server that preserves the console desktop.
- 5. Verify the desktop remains unlocked and drawn before running the agent.
- 6. Monitor for idle lock or sleep timeouts and adjust settings to prevent mid-run locking.
证据
GUI automation needs a desktop that Windows is actually drawing, and both of those actions take it away.
By default the Remote Desktop client tells the remote session it is not visible, and Windows switches that session to a GUI-less mode.
SendInput style calls simply have no live desktop to deliver to, which is why the tool reports success while nothing moves.
- 记录日期: 2026-11-03T07:13:58.449Z