Sendkey() unattended

Hi all

I was reviewing several posts and I can’t find a solution to the following:

I have Robots running on a PC and I need to transfer them to a server. This is where the problem with Sendkey() arises, since from what I saw, it doesn’t work in an unattended environment. Its execution returns “Access is denied”

I need to impersonate all SendKey(), is there a way to send keys in unattended mode? For example, enter a value and press ENTER, how could I do it?

@AlvaroS6 As long as you ensure your unattended screens do not lock, there is nothing else that I have experienced that prevents SendKeys from working on an unattended machine. There is no way for you to be able to use SendKeys or screen OCR on a locked machine.

@ThomasSasnett

Thanks for the reply. 

But the server doesn't has screen. After disconnecting, the session remains open, but is it possible to prevent it from being blocked?

@AlvaroS6 If you are connecting via RDP, then I know that will lock your screen when you disconnect. I thought there was a disconnect command you could run on your VMs, however you would need to research that with Microsoft as we don’t suggest using RDP to control your bots. You can use Pega Robot Manager and the RPA service to start your bots, as that will allow them to run autonomously without you having to connect to them and then ultimately disconnect from them.