Dear Volly,
Actually I am using xyNTservice to start a batch program as a service and use
the batch program to run a simple AutoIt script to test whether it can interact
with other GUI program for installation. The testing script is trying to invoke a
notepad.exe, type some words on it and saving it as a file. The script is :
Opt("WinTitleMatchMode", 2)
Run("notepad.exe test.txt")
WinWaitActive("Notepad")
Send("This is some text.")
sleep(3000)
WinClose("Notepad")
WinWaitActive("Notepad")
Send("!y")
It can work if the batch program is configured to interact with UserInterface in xyNTservice
when a user is logged on. For other cases (no user is logged on or the batch program is
configured not to interact with UserInterface in xyNTservice), it won't work and the testing
script seems not able to detect the presence of the Notepad window and keeps waiting
forever. Thank you.