Keeping Windows (Server) User Session alive 24/7 - Attended Bot 24/7

Hello,

unforunately my Windows (or IT-Infrastructure) knowledge is fairly limited so I hope you’ll understand what I mean.

I have the following situation:

We’re running an attended Bot on a VM. We connect to that VM via RDP. We usually connect, start the bot, leave RDP open, wait until it’s done, disconnect.

We have to stay connected, because once you disconnect, the bot stops.
We know from others that they have set their VM up in a way, that the session (is that even the right word?) stays alive forever, so the Bot can do it’s job even without anyone monitoring it.

I know that it works, I just don’t know how.

What I need is basically this:
How can I set up a Windows VM (Server and/or Win 10) so that when a User disconnects the RDP Session, everythink that’s running on the VM (Webserver, UiPath Bot, files being copied) continues without a problem. Ideally the user should have the possibilty to connect again without anything stopping.

Is this even possible without third party software?

Cheers,
T0Bi

If you log in via RDP to VM you taking the session. So when you disconnect from VM also UiPath robot losing connection.
If you want to launching scripts without using rdp you need unattended license and scheduled script in into Orchestrator.
Attended license it is not used to run scripts via rdp. If you want to use it you have to wait to robot end of his work. Definitely better is using unattended robot.

But you can also use a cronjob to start a process via the commandline. This works with an attended Bot licence as well.

The big problem is, that the bot can’t do UI Automation if the VM isn’t set up correctly.

Ok. But for unattended robots you providing login and password to VM and robot can log in remotely there and use UI automation etc.
To use attended bot you have to be log in to PC and account have to has active connection to interface. To use UI Automation for attended bot you have to be log in via RDP or Hyper-v/Vmware console to VM, then robot will can work correctly (have access to desktop etc.)
Without it you have only VM power on. Disconnected user doesn’t have visible interface like desktop etc. needed for Ui automation.
Make sense ?

I know all of that.

And I also know that there is a way for a VM to have an active User Session (as if you were logged in via RDP) so that an attended Bot can work, even though no one is connected.

We already have attended bots running 24/7 in such environments, and it works.
But in those cases, the customer provided the VM and is likely using third party software for that.

I’m asking: Is there another way?

Have you tested to disconnect from the RDP session using tscon.exe instead?

https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html

1 Like

This is perfect!
Thanks a lot

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.