Jump to content

Execution in a VM AWS


brhenbr
 Share

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

 

Link to comment
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:

Quote

I managed to workaround the issue by actually connecting to the server to itself (to 127.0.0.1) 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.

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • Moderators

@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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...