YoMarK Posted September 19, 2005 Share Posted September 19, 2005 I've found out about AutoIT a few days ago, and i think it's great! I'm trying to use AutoIt for software distribution(SMS 2003), using SMS and made the following script to install logitech's setpoint unattended and hidden. run("SetPoint240nld.exe") Sleep(10000) ControlSend("SetPoint - InstallShield Wizard", "", "Button1", "{ENTER}") Sleep(1000) ControlClick("SetPoint - InstallShield Wizard", "", "Button5") Sleep(1000) ControlSend("SetPoint - InstallShield Wizard", "", "Button2", "{ENTER}") Sleep(1000) ControlSend("SetPoint - InstallShield Wizard", "", "Button1", "{ENTER}") Sleep(1000) ControlSend("SetPoint - InstallShield Wizard", "", "Button6", "{ENTER}") Sleep(1000) ControlSend("SetPoint - InstallShield Wizard", "", "Button1", "{ENTER}") Sleep(90000) ControlClick("SetPoint - InstallShield Wizard", "", "Button2") Sleep(1000) ControlSend("SetPoint - InstallShield Wizard", "", "Button5", "{ENTER}") It works fine, but i'm not really that happy with the Sleep() functions that are necessary for ControlSend to work. I don's want the make them to long, and on a slow computer the delay can be to short(not sure). I cannot use "normal" Send and something like WinWaitActive because( I think ) the installer/script is running in the background thus there are no Active Windows to send to. Is there another way for the above script to work, without using delays ? Thanks!!! Link to comment Share on other sites More sharing options...
GaryFrost Posted September 19, 2005 Share Posted September 19, 2005 Look into WinWait and WinWaitActive SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
YoMarK Posted September 20, 2005 Author Share Posted September 20, 2005 (edited) Look into WinWait and WinWaitActiveWinWaitActive doesn't work(see my first post).I've tried WinWait now, unfortuanally it also does not work.run("SetPoint240nld.exe") WinWait("SetPoint - InstallShield Wizard", "Welkom bij de InstallShield Wizard voor Logitech SetPoint") ControlSend("SetPoint - InstallShield Wizard", "", "Button1", "{ENTER}") WinWait("SetPoint - InstallShield Wizard", "Licentieovereenkomst") ControlClick("SetPoint - InstallShield Wizard", "", "Button5") Sleep(100) ControlSend("SetPoint - InstallShield Wizard", "", "Button2", "{ENTER}") WinWait("SetPoint - InstallShield Wizard", "Doellocatie selecteren") ControlSend("SetPoint - InstallShield Wizard", "", "Button1", "{ENTER}") WinWait("SetPoint - InstallShield Wizard", "Opties selecteren") ControlSend("SetPoint - InstallShield Wizard", "", "Button6", "{ENTER}") WinWait("SetPoint - InstallShield Wizard", "Gereed om het programma te installeren") ControlSend("SetPoint - InstallShield Wizard", "", "Button1", "{ENTER}") WinWait("SetPoint - InstallShield Wizard", "InstallShield Wizard voltooid") ControlClick("SetPoint - InstallShield Wizard", "", "Button2") Sleep(100) ControlSend("SetPoint - InstallShield Wizard", "", "Button5", "{ENTER}")I've compiled the code above into an .exe, en put it into SMS, where it will be distributed and then run under the Windows "System" account on the workstations.The result is that two processes with the name SetPoint240nld.exe run in the background(doing nothing/hanging).(The code in my first post however works fine.)So it seems that WinWaitactive and WinWait do not work when run under the system account, which has no "normal" desktop.Sleep() function however works fine, but I cannot rely on that because it will probably fail(delay to short) if a workstation is heavily used by a user.Is there any other way ? Edited September 20, 2005 by YoMarK Link to comment Share on other sites More sharing options...
water Posted September 20, 2005 Share Posted September 20, 2005 As this is a InstallShield program, why don't you use a silent install with a response file?See Installshield You simply run "SetPoint240nld.exe -r" to record the installation and then "SetPoint240nld.exe -s" to replay the installation using the recorded data from the iss file. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
YoMarK Posted September 21, 2005 Author Share Posted September 21, 2005 Thank you guys(setpoint works great now)! Still I'm interested in doing something like this with AutoIT, because we want to install all our(new) software using software distribution(and many vendors are not using Wise or Installshield). Something like a WinWait that works on hidden Windows ? Link to comment Share on other sites More sharing options...
water Posted September 21, 2005 Share Posted September 21, 2005 Still I'm interested in doing something like this with AutoIT, because we want to install all our(new) software using software distribution(and many vendors are not using Wise or Installshield).Hi,we are using Software Distibution here as well (Empirum made by Matrix42 for about 1200 PCs and Notebooks). More than 95 percent of our Software uses MSI, Installshield or other installers that allow a silent install.I would use the installers wherever possible because this is the supported way by SMS or whatever you use. For the rest of the SW we use a snapshot installation. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki 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