Is there any way we can unlock the Windows session, if it is locked?

I have made an RPA Process which uses CV activities to scrape data from a Citrix application from a RDP session.
When the RDP session is active, the RPA process is working fine and scrapes data as needed.
But when I stopped the RDP session, the RPA process scrapes data normally for 30 mins and then throws an error saying that the Windows session is locked.
And when again I logged into the RDP session, the scraping works normally, the exception no more occurs.
I have cross-verified twice that after stopping the RDP session, for 30 mins scraping happens and then below exception occurs. And after logging in to the session, the scraping works fine and below exception no more occurs.

Note: I have to use CV Screen activities to perform the RPA process. There is no other way to achieve the scraping without using CV Screen activities

Below is the error which I am facing -
CV Screen Scope: Cannot bring the target application in foreground because the Windows session is locked.
I have also given an unattended license to the machine because I want to run the RPA process unattended.
Is there any way we can unlock the Windows session once the above exception occurs, during the automation process itself?

Any help would be appreciated, Thanks & Cheers!

Hi @YashBiswakarma

When ever we use the cv activities the UiElements must be visible for the activities to run properly.
So, that why u face the issue when the rdp gets disconnected. It’s mandatory to keep the rdp connected when u r using the CV activities.


Did you install the robot in service mode?

And you can enable login to console as well in robot settings


You shouldn’t be doing this. If you want the automation to run without you, then you have to set it up to run unattended so it starts its own RDP session.

yes , i have setup the robot in service mode

Also, I have given console details and password into robot settings

To start its own RDP session, I will have to perform or start process from different machine


Please enable this and try

and yes it is not advised to disconnect while bot it running.please sign out before run and then try to trigger bot from orchestrator


Ok, lemme check that, will get back to you

1 Like

No. This is what unattended means. Orchestrator starts its own RDP session. You don’t log into anything.