wongism Posted November 14, 2008 Share Posted November 14, 2008 I'm a newbie to autoIt and was looking for some help on 2 things and any help would be appreciated. Objective: To create an auto install for a program located on a network share. Problem 1: The setup.exe doesn't exicute Problem 2: Almost all of the windows have the same Title and I can't find how to make autoIt wait for the right time to exicute my choices Code: ; IMS\21 install EnvSet ("Server","\\\\wfsdi01\\AppInstalls") Run ("%Server%\\Ims21\\IMS21_SETUP\\CLIENT\\SETUP.EXE") WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard") Send ("!n") ; License agreement Send ("!a") Send ("!n") Send ("!c") FileChangeDir ("C:\Ims21") Send ("!o") Send ("!n") ; Installation Send ("!i") ; Finish Send ("!f") ; Clean up FileMove ( "C:\\Documents and Settings\\%userName%\\Start Menu\\Programs\\Startup\\Ims Tcpip Server.lnk", "C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Start") FileMove ("C:\\Documents and Settings\\%userName%\\Desktop\\PC Inquiry.lnk", "C:\\Documents and Settings\\All Users\\Desktop") FileDelete ("C:\\Documents and Settings\\%userName%\\Desktop\\Ims Tcpip Server.lnk") FileDelete ("C:\\Documents and Settings\\%userName%\\Desktop\\Ims Properties.lnk") Link to comment Share on other sites More sharing options...
wongism Posted November 14, 2008 Author Share Posted November 14, 2008 figured the first part out...still working on number 2 code: $Server = \\wfsdi01\AppInstalls\Ims21\IMS21_SETUP\CLIENT\SETUP.EXE Run ($Server) WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard") Send ("!n") Link to comment Share on other sites More sharing options...
LarryDalooza Posted November 14, 2008 Share Posted November 14, 2008 sorry... this just made me laughstill working on number 2Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 14, 2008 Share Posted November 14, 2008 (edited) ...still working on number 2Get more fiber in your diet. code: $Server =” \\wfsdi01\AppInstalls\Ims21\IMS21_SETUP\CLIENT\SETUP.EXE” Run ($Server) WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard") Send ("!n") Use the unique visible text available from the window, like: $sWinTitle = "Ims21 Version 6.4.1 - Client - InstallShield Wizard" While 1 If WinExists($sWinTitle) Then If StringInStr(WinGetText($sWinTitle), "Welcome to the client install") Then ControlSend($sWinTitle, "Welcome to the client install", "", "!n") ExitLoop EndIf EndIf Sleep(50) WEnd Edited November 14, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
wongism Posted November 17, 2008 Author Share Posted November 17, 2008 WOW, what a relief, I was finally able to pass #2.....added the secondary titles. WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard", "License Agreement") WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard", "Choose Destination Location") Thanks for your help. 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