Working with closed or blocked RDP window

Running bots from a SaaS Orchestrator on a VM requires the ability to execute tasks while the RDP window is blocked or closed. Find out more information about How to work with blocked RDP window

Method 1. Additional virtual machine

For this method to work you need to open an additional (buffer) machine and configure the terminal client there to support minimized mode.


Connect VM1 to Orchestrator SaaS and start the workflow on VM1. Configure the terminal client on VM2 as described in this article. After that, connect from the developer’s machine (VM0) to VM2, and from VM2 to VM1. The next step is to close the connection M0 to M2, without closing the connection VM2 to VM1. After that, you can run bots through Orchestrator SaaS.

Method 2. Creating a bat file

The idea is to create a BAT file with the following content:



for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (

%windir%\System32\tscon.exe %%s /dest:console

)

Run it as Administrator instead of closing the session in the terminal. After it has started, you will get a message saying that “another user is logged into the session” and the RDP window will close. You will be able to run robots, including those working with interface elements.

4 Likes

I used Method 2 and it works great. But you need to be aware of the screen resolution and if you use 2 monitors (expands the screen).

2 Likes

Hi @pedro.azevedo, Thank you so much for your positive review. It’s great that you found method 2 to be working well for you.

1 Like

@pedro.azevedo Thanks for your advice!

1 Like

Does it work with closed buffer machine?

1 Like

@Anatoly_Minaev yes, the user can disconnect from buffer machine VM2 but VM2 is up and running.

1 Like

Hi! I have to run workflows on a server of my company where I dont have administrator privileges.
How can I run workflows with the minimized window?

1 Like

Hi Daniele, the system that you are automating is a Desktop or Web system? If its Web, you could set the browser as “Chrome Selenium” and in this case you could run the workflow and interact with elements even if the browser is minimized. For the desktop system, if your automation interact with the interface elements, the system would need to be maximized.

But if you are asking about running with a closed/minimized remote desktop connection, you can check above the two ways of doing it.

2 Likes

Hi Renan! My workflow uses a mix of the two. The first part takes place on chrome to download documents: at the time of “Save As” I have to take the name of the document shown (a random name is generated) with the activity “get element value” but if the window is minimized can not take this value. Method 1 is not recommended, I have to create a VM for each user with BOTRUNNER (they use SSO systems), the second I have no administrative privileges

1 Like

Hi @daniele_arcangeli
I can recommend you to create a bat file or try RDP settings from SaaS Orchestrator, if you can not use the first method. The user should have administrator privileges.

1 Like

Hi Daniele,
We have developed a solution that allows you to rdp where the bot runner is, whether it is minimized or offline, using a small linux server. Run your automations without worrying about what state the bot runner session is in.

Sergio Souza