boon Posted April 30, 2012 Share Posted April 30, 2012 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. Thanks. Link to comment Share on other sites More sharing options...
Zedna Posted April 30, 2012 Share Posted April 30, 2012 Look here http://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Morthawt Posted April 30, 2012 Share Posted April 30, 2012 Good to know, I bookmarked that for my own purposes. I had not even thought about trying to automate while the system is locked. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
clicked Posted April 30, 2012 Share Posted April 30, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now