Jump to content



Photo

Application installation when running AutoIt as a Service


  • Please log in to reply
1 reply to this topic

#1 wellknown

wellknown

    Seeker

  • New Members
  • 4 posts

Posted 02 October 2007 - 08:50 AM

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. What I want is to be able to install other programs automatically by using similar
method without any user interactively logged on? It seems that there is no common GUI output
area between the target application and AutoIt script to interact with when invoked by a
service without a logged on user. Is there any solution or workaround for my case? Thank you.







#2 YogiBear

YogiBear

    deFinitely not yoUr average bear!

  • MVPs
  • 9,873 posts

Posted 02 October 2007 - 03:08 PM

Look for software called bigfix.
http://www.bigfix.com/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users