Jump to content

Execution in a VM AWS

Recommended Posts


Hi everyone,

I'm new on autoit programming and I'm having some issues.

I built a simple code that open an app, types user and password then connect. It's working while I'm connected on the VM by RDP from windows. but, when I try to use task  scheduler and set this code to execute on a time that I'm not using the VM, the code doesn’t work (it open the windows but doesn't type user and password, maybe because it don't get focus the windows in order to type correctly).

Is there someone that has tried something like this?


The VM is a AWS EC2 with Windows Server 2012R2


Share this post

Link to post
Share on other sites

Hello, I was in a similar situation a few months ago, read my answer at StackOverflow: https://stackoverflow.com/a/45746816/3815591. I am quoting the answer here for your convenience:


I managed to workaround the issue by actually connecting to the server to itself (to via RDP so that it will always have an active RDP session for the automation script to run.

I am not happy with the results but it works... I cannot give clear instructions on how you would need to modify the settings in Windows to allow RDP connections from self, it was a one big trial and error process, I have to modify some policies in the Group Policy Editor and then some stuff that I don't remember.

There is another downside to this, a Windows server will allow 2 simultaneous connections to it but by using this method we are reserving a slot so only 1 connection at a given time is possible, something to be aware of.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)


My contributions to the AutoIt Community

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) mean to do that to anybody!!!



Share this post

Link to post
Share on other sites

@brhenbr before resorting to any unwise hacks to the system, how about posting your code so we can actually see what you are doing? Obviously if you have code running via the Task Scheduler that has MouseClicks or Sends it is going to fail.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now