Sign in to follow this  
Followers 0
AndreasJohansson

GUI interaction fails

1 post in this topic

Hi,

I have a compiled AutoIt script that is executed from a service which runs under the System account on a Win2k3 machine ('Allow service to interact with desktop' is checked). The problem is that the script executes an application that displays a GUI dialog and AutoIt can't "see" the dialog until someone logs on to the machine's console - a user therefore always have to be logged in for the script to work. Is there a workaround for this issue or do I have to modify my script to execute the application with the 'RunAs' function?

Current code

...
Run(@ComSpec & " /c " & $strPath & '\' & $strExec, "", @SW_HIDE)
...
While 1
  If (WinActivate("Banner")) Then
    Send("{ENTER}")
    ExitLoop
  EndIf
Wend
...

Thanks!

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