Using XClick via RDP with locked PC

Hi all,

I would like use Macro with XClick command, with an remote server controlled my a PC with locked screen or without active rdp connection and pc (this well be the best solution). Can i run XClick command without active monitor (in desktop mode). Any solution? Now if i lock my PC witch controlls the server where the UI vision installed, the XClick command stops work.


XClick requires an unlocked desktop:

You can however run browser automation w/ a locked desktop

Just as @User9898 said: XClick is a desktop level automation command and requires an open deskop. But there is a good workaround to run desktop automation on a locked desktop… the “trick” is to use an unlocked virtual machine inside a locked desktop, or to use autologin.

1 Like

Thank you, tscon is what i need.

Sadly this solution isn’t working, XClick dont click or dont click to the correct position after the session closer command. In logs the click is done, so i think the problem is the positioning? Maybe the resolution changes after the command?

%windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console

Does it work when you are logged in? If so, then it should work fine when you are logged out with the tscon trick.

Another solution to the same problem is to not use Microsoft RDP for login, but for example Anydesk or Teamviewer. With these kind of remote desktop connections, you can disconnect without closing the desktop itself.

Yes, if i logged in with rdp, works fine, but when i disconnect with tscon the clicking location isnt correct.
The resolution changes after disconnect?