Guest mlchris2 Posted August 23, 2005 Posted August 23, 2005 Newb to AutoIT... created several scripts that automat the installation of several applications we use in our corporation. I am attempting to create a single script that executes the .exe and .msi files. I basically copied the script code from the 5 installs I have and generated one large script. I compiled and ran the script. It only executes the first "Run" and then pauses... Here is the script- ;MS DOTNET Framework installation process RunWait("\\ddn1\itsupport\apps\dotnet\msdotnet.exe") WinWaitActive("Microsoft .NET Framework 1.1 Setup") Send("{Enter}") WinWaitActive("Microsoft .NET Framework 1.1 Setup", "Installation of Microsoft .NET Framework 1.1 is complete.") Send("{Enter}") ; ;MS DOTNET Framework SP1 installation process RunWait("\\ddn1\itsupport\apps\dotnet\msdotnetSP1.exe") WinWaitActive("Microsoft .NET Framework 1.1 Service Pack 1 (KB867460)","OK") Send("{Enter}") WinWaitActive("Microsoft .NET Framework 1.1 Service Pack 1 (KB867460) License Agreement", "I &accept") Send("!a") WinWaitActive("Microsoft .NET Framework 1.1 Service Pack 1 (KB867460)","OK") Send("{Enter}") WinWaitActive("Microsoft .NET Framework 1.1","&No") Send("!n") ; ;PhotoZip installation process RunWait("\\ddn1\itsupport\ntents\photozip\DDNPhotoZipInstall.exe") WinWaitActive("DDN Photo Zip Install", "&Yes") Send("{Enter}") WinWaitActive("WinZip Self-Extractor - DDNPhotoZipInstall.exe", "&Setup") Send("{Enter}") WinWaitActive("DDN Photo Zip", "Welcome to the DDN Photo Zip Setup Wizard") Send("{Enter}") WinWaitActive("DDN Photo Zip", "Select Installation Folder") Send("{Enter}") WinWaitActive("DDN Photo Zip", "Confirm Installation") Send("{Enter}") WinWaitActive("DDN Photo Zip", "Installation Complete") Send("{Enter}") ; ;MSN Messenger 7.0 installation process RunWait("\\ddn1\itsupport\apps\messenger\msn_messenger.exe") WinWaitActive ("MSN Messenger 7.0 Setup Wizard","Install MSN Messenger") Send ("{Enter}") WinWaitActive ("MSN Messenger 7.0 Setup Wizard","Terms of Use and Privacy Statement") Send("!a") Send("!n") WinWaitActive ("MSN Messenger 7.0 Setup Wizard","Choose additional features and settings") Send("!t") Send("!s") Send("!h") Send("!r") Send("!n") WinWaitActive ("MSN Messenger 7.0 Setup Wizard","MSN Messenger has been installed") Send("{Enter}") ; ;SaleRep/LiveChat installation process RunWait(@COMSPEC & " /c Start \\ddn1\itsupport\Apps\salesrep\salesrep.msi") WinWaitActive ("Monitor Launcher","&Next") Send("!n") WinWaitActive ("Monitor Launcher","WARNING") Send("!n") WinWaitActive ("Monitor Launcher","Select Installation Folder") Send("!e") Send("!n") WinWaitActive ("Monitor Launcher","Confirm Installation") Send("!n") WinWaitActive ("Monitor Launcher","Monitor Launcher has been successfully installed") Send("!c") ; ;Adobe Reader 7 installation process RunWait("\\ddn1\itsupport\apps\adobe\adobe_reader7.exe") WinWaitActive ("Adobe Reader 7.0 - Setup","&Next") Send("!n") WinWaitActive ("Adobe Reader 7.0 - Setup","WARNING") Send("!n") WinWaitActive ("Adobe Reader 7.0 - Setup","Install Adobe Reader to:") Send("!n") WinWaitActive ("Adobe Reader 7.0 - Setup","Click Install to begin installation") Send("{Enter}") WinWaitActive ("Adobe Reader 7.0 - Setup","Setup Complete") Send("{Enter}") Any ideas what I left out or am doing wrong... thanks Mark
herewasplato Posted August 24, 2005 Posted August 24, 2005 ...It only executes the first "Run" and then pauses...<{POST_SNAPBACK}>The help file for RunWait states:After running the requested program the script pauses until the program terminates. To run a program and then immediately continue script execution use the Run function instead.You said that you had 5 scripts - Did each of those scripts use RunWait?You might want to change from "Send" to "ControlSend". Also, if someone or something steals the focus of one of your windows at just the wrong time during the install, the WinWaitActive lines would just sit there. The "Control" series of functions might be able to send enter or click to a window that is not active.Assuming that you posted all of the code in your script, then you might want to add the code from FAQ #14 to the top of the script:http://www.autoitscript.com/autoit3/docs/faq.htm#14; Place at the top of your script$g_szVersion = "My Script 1.1"If WinExists($g_szVersion) Then Exit ; It's already runningAutoItWinSetTitle($g_szVersion); Rest of your script goes here Also take a look at the AutoItSetOption section of the help file and see if you want to change any of the default settings.hope this helps... [size="1"][font="Arial"].[u].[/u][/font][/size]
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