Jump to content

Schedule and Run autoit script on a remotely connected machine


 Share

Recommended Posts

Hi,

I am calling an autoit script(.exe) from a batch file to run on a remotely connected machine. This autoit script sends commands to a GUI app to install a product on the system. The issue i am facing is that this task is scheduled to run overnight and unattended. So if the remote machine is locked or minimized or even the monitor is switched off keeping the remote session active the auto it script hangs since the focus on the window of the GUI is lost and will resume only when the user focuses on the GUI with the mouse.

Kindly help me in resolving this issue so that i can run the autoit script unattended on a remotely connected machine.

Note: i am connecting to a windows 64 Vista machine remotely from a windows 32 XP machine. There are no issues in remote connection. The only issue here is to run the autoit script unattended without losing the focus on the GUI app when the remote session is locked or disconnected without user logging off or remote session minimized.

i am using a FBTaskScheduler to schedule and run the batch file which internally calls the autoit script thought the autoit exe.

Thanks and Regards,

Simran

Link to comment
Share on other sites

What I would do is use the task scheduler built into windows. Look in the control panel. Second, I suspect your script uses mouse clicks instead of using controlclick. Third, I would look to see if your installable package is built with Wise or InstallShield. If so, it may support command line switches (CLS). If it does support CLS then I would use the /s switch to perform the install silently. In many cases you may also be able to use an answer file to populate things such as keys and specific settings.

All of this is subject of course to guess. I haven't seen your script, so I'm left to an educated guess.

Link to comment
Share on other sites

What I would do is use the task scheduler built into windows. Look in the control panel. Second, I suspect your script uses mouse clicks instead of using controlclick. Third, I would look to see if your installable package is built with Wise or InstallShield. If so, it may support command line switches (CLS). If it does support CLS then I would use the /s switch to perform the install silently. In many cases you may also be able to use an answer file to populate things such as keys and specific settings.

All of this is subject of course to guess. I haven't seen your script, so I'm left to an educated guess.

Hi, Thanks for the reply. Let me explain the complete procedure which my batch file is executing. The batch file is written to enter into a location where an exe is present and copy that exe to local drive of the system and install that exe using autoit script.

Now i had scheduled this batch file for execution using FBTaskScheduler/WindowsTaskScheduler overnight. But the issue here is the system on which all these actions are performed is connected remotely i.e. i connect to that 64 bit Vista machine from my 32 XP machine. So if i minimize the remote session / disconnect it without logging off the user from system the batch file execution hangs at the autoit script. This is because the autoit script is actually installing a product which has a GUI(Install Shield wizard) and the script needs to focus on each window of the GUI and send key strokes to proceed further on each screen of the GUI.

So i want the solution such that autoit script runs without losing the focus on the GUI windows of the product being installed by the script and i can peacefully minimize/disconnect the remote session and lock my 32 XP machine and leave for home.

If possible please provide me a full proof solution for this issue.

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...