Emulate Sendkeys to allow Bot's running on VM

Hello everybody!

We are having issues running our bots that use SendKeys in VM's. Some of this bots don't run when we close the RDP window, and others don't even run if we minimize the RDP window. We have already tried two solutions:

1. Use tscon.exe script to close RDP sessions correctly for Bot's background execution.

2. Create RemoteDesktop_SuppressWhenMinimized key to avoid the problem when minimizing RDP sessions.

These solutions have worked with some Bots (mainly the ones that use windows applications). However, the bots that use Web Applications and Sendkeys keep failing. Do you know another way to emulate Sendkeys, or an extra alternative to close RDP sessions correclty ?

Thank you for your attention!


Keep up to date on this post and subscribe to comments

October 9, 2019 - 12:46pm

Rather than connect to your RPA bots via RDP, I might suggest you use the RPA Scheduling service. In my experience, it unlocks the machines and allows things that require the session to be unlocked (like SendKeys) to work as expected. As for your suggestions; pre Robot Manager and pre RPA Scheduling Service, I had customers use the TSCON command, but that only worked on Windows 7 as I recall. I am not familiar with your second option though. I would suggest that you look into why you are having to use SendKeys so much. Ideally, you would be able to figure out the correct way to trigger things in your applications without the use of SendKeys as it is pretty much a last resort.

October 9, 2019 - 2:18pm
Response to tsasnett

Thank you for your answer! Do you know if RPA Scheduling Service supports multiple schedules on the same day? 

October 10, 2019 - 10:09am
Response to AndresL5

The current version does.

October 11, 2019 - 12:34pm
Response to tsasnett

Do you how I can do that? Based on the documentation (, the RpaSchedule.json only accepts one schedule per day.

October 11, 2019 - 1:59pm
Response to AndresL5

You are correct. Through the JSON, you can only have one schedule per day. Scheduling through Robot Manager allows you to define multiples.