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).

3 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!

2 Likes

Does it work with closed buffer machine?

2 Likes

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

2 Likes

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?

2 Likes

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.

3 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

2 Likes

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.

2 Likes

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

2 Likes

Method 2 works great :ok_hand:t3: but you have to run the .bat file as administrator forcefully and then schedule your workflows from the Orchestrator.

I also tried the RDP settings from SaaS Orchestrator but still isn’t working (never connected), I assume because it is in beta version.

1 Like

I need manage several bots with sessions on all states (rdp minimized, offline …) and SaaS Orchestrator RDP solution does not answer everything.
Because of that we wrote an application that meets what we needed.

1 Like

@RODPOLUEN, please check the following video I recorded some time ago for the RDP Connection feature: RDP Connection feature - Test
Hope this works for you!

3 Likes

¡Gracias Diego! It worked. :grin: :ok_hand:t3:

I was setting the credentials according to the official documentation:
domain\username and username@domain:

So it would be nice that someone could update the article with the correct way to set the credentials.

¡Saludos! :v:t3:

3 Likes

Hi @dm.ferreyra thanks for the video. Small question: is it possible to set the screen resolution for the RDP session?

2 Likes

Hi Juan. Actually I’m using Windows 10 and the native RDP connection app. I don’t know if you are using the same as I do.

I actually can change the resolution before I connect:

image

Hope it helps.

3 Likes

This is great information! Thank you all for your input! I noticed in our account that it says that RDP is currently in beta mode and is currently available to all users. However, within roughly two months, it will be exclusive to gold and silver customers. If we are not gold or silver, is the only way to run a bot on the local computer–or is there another way? Thank you in advance!

2 Likes

You can find subsequent articles about RDP Connection here:

  1. RDP Connection in Orchestrator SaaS
  2. Working with a minimized RDP window