I'm getting the below error after scheduling run my Bot in the VM. Is there way to sort the attached error: Cannot bring the target application in foreground because the Windows session is locked

Please find the below Snip.
Error: Cannot bring the target application in foreground because the Windows session is locked.

image

When I ran the Bot in the Picture in Picture mode, that ran successfully.

Is there a way to schedule to run a Bot only in Picture in Picture mode.

Thank you,
Ruvinda

Hi @Ruvinda_Nilakshika

Go to settings on your robot…and check the option login to console to true and then to false…hope that solves the issue.

And if you want to run in pip always then go to peoject settings and select pip mode from options

Cheers

Dear Anil,

Thank you for your reply. Kindly advice from where to disable log in to consol option.

Run in PiP enabled. But that worked only in Debug Mode.

  1. When ran the Bot in the Debug Mode, It was ran in picture in picture mode as expected.
  2. When ran the bot from the Orchestrator and when user is logged in to the VM, It was ran from both Picture in Picture mode and in the VM
  3. When ran the bot from the Orchestrator and when user is not logged in to the VM, it was run only in the VM. Picture in Picture mode was not worked.

Thank you,
Ruvinda

Stop people from logging into your VM with the robot account and then just closing the RDP window. You have to SIGN OUT.

People shouldn’t be using robot accounts to log into the servers, anyway.

1 Like

No. PiP is for attended automations. You don’t schedule attended automations, users run them manually.

This is what is causing your problem. You are interfering with Orchestrator being able to control the RDP session. Sign into your VM with the robot account then SIGN OUT (don’t just close the RDP window). Then stop logging into it.

Hi @Ruvinda_Nilakshika

Please see this… This is how you will set login to console

And rest whatever @postwick mentioned stands true

cheers

Dear @postwick and Anil,

Thank you very much for your comments.

I’m having this concern as well.

In my process there are some click activities; those are not configured for Simulate click.
Because, below buttons need to click from a Power BI report. Not exactly acting as HTML buttons.

Looking for your valuable comments.

Thank you,
Ruvinda

This is not the way to solve their problem.