Problem with unattended robot and browser

On the UIPath forum I’ve seen a post regarding using tscon to disconnect from an RDP session but leave the GUI active. UiRobot run in Remote desktop
I’ve see a similar post here for different use case Disconnecting From Remote Desktop While Running Automated Tests | TestComplete Documentation

What I tried was from cmd as administrator, I ran “query session” to get my Session Name. Then ran " %windir%\System32\tscon.exe RDP-Tcp# NNN /dest:console" substituting my Session Name for “RDP-Tcp#NNN” e.g. %windir%\System32\tscon.exe rdp-tcp#35 /dest:console which kicked me out of my session as expected. Then from orchestrator I kicked of my job and the bot still hangs on browser input for username and password for my web app. I know that both username and password type into’s use simulate type and the click on login uses simulate click. But this doesn’t work, has anyone had any success with tscon.exe? Or anyway to get GUI interation to work while an RDP session is disconnected?

Best regards.

Allow me correct myself, using tscon.exe does work but it took some doing to go through my process and make sure every interactive activity was using either simulate click/type or send windows message. Also, just disconnecting from the RDP session did not work for me, I had to use the tscon.exe method to disconnect. For my robot in settings, the Login to Console had to be set to No. One of the feature that helped meet track down were the process was hanging up and timing out was to set the robot settings for Logging Level to Trace. Then in Automations => Logs, or for the Job, you can click on the more icon (the 3 vertical dots on the right) and click View Logs. Having the bot’s Trace on gave me the detail I needed to figure out where in my process I needed to change the click or type to simulate or windows message.

One other thing. As far as I can tell this only works for RDP. I tried with VMWare VDI and it doesn’t work. When I used query session got get the session name, the rdp-tcp session name has no #number on it and tscon.exe doesn’t like it. I believe if seen there’s some VDI settings that can be tweaked but in my environment I need to get some admins to help me out with that.

Hope this helps anyone who had been struggling with running their bots totally unattended.

1 Like