Jump to content
Sign in to follow this  

Is it possible to schedule script that will run an application and interact with its GUI when no one is logged on?

Recommended Posts


I don’t think this is an AutoIt issue per se, my question is whether or not it’s possible to schedule an AutoIt script (compiled to an exe) that will run up an application and interact with its GUI even when no one is logged on to the server.

I want to write a script that runs on a server (2008 std) and every hour runs up an application with a GUI and interacts with it. Being a server, I want it to do this even when no-one is logged on.

I only discovered AutoIt today and am trying to do a proof-of-concept exercise by trying to run up a modified version of the example calculator script. I’ve modified it so that it does not close the calculator down after interacting with it – the idea was to:

1. Schedule the script to run

2. Cllose my RDP session to the server

3. Wait a couple minutes so that the scheduled activity should have been performed

4. Log back in and observe that the GUI had been interacted with

My problem is that when I log in, the calculator window is not visible.

The script works fine if I run it myself on the machine, if I run it using the task scheduler the calculator dialog does not appear (although it has been run up – I can verify this using task manager).

I’ve tried using the RunAs to run as administrator on the machine and that doesn’t work either.

As I said, I don’t think this is a problem with AutoIt – if I create a scheduled task to simply run up calc.exe I get no dialog appearing either. I just hope someone can help with this.


Share this post

Link to post
Share on other sites

This solution may not be suitable for your situation, but we run our servers as VM's. You can cause VM's to open a console window during its reboot, but because the console is "virtual", it does not physically open anywhere on any screen or keyboard. However, it is a real GUI with real hwin's etc and you can run AutoIt scripts in it. The virtual console is accessible through the vSphere client in the usual way and is protected by a vSphere password, so it is secure.

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
Sign in to follow this