Sign in to follow this  
Followers 0
TBarnes

Will AutoIT work w/o a desktop?

5 posts in this topic

I am curious if AutoIT is functional in the case where no user is logged in and no desktop exists. I have an application that is started by a service. When the system starts my application is started. I would like to have AutoIT run by this application, but it is apparently not recognizing application windows. I suspect it searches for windows via the desktop, which is causing a problem when there is none.

Are there options I should try or is this unworkable?

Share this post


Link to post
Share on other sites



Hi there

I'm not sure, but this may do what you need.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I am pretty sure that the desktop has to be active for GUI scripts to work, but if your task can be scripted without GUI interaction there shouldn't be a problem....at least in my experience.

Edited by spudw2k

Share this post


Link to post
Share on other sites

I also think there can't be GUI without logging.

Maybe you mean locked workstation instead?

In that case look at this:

http://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F

Share this post


Link to post
Share on other sites

You can idle your script until it detects that someone is logged on (and the desktop is therefore active).

Take a look at this post for logon detection:

To add another layer of verification, you can also check if both the Taskbar and the Desktop already exist.

Taskbar: WinGetHandle("[Class:Shell_TrayWnd]")

Desktop: WinGetHandle("Program Manager")

Either one will return "" if they're not present.

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  
Followers 0