peterj04 Posted October 11, 2011 Posted October 11, 2011 I have the automated pieces of my script built, but now I need to figure out how to add some options. I am always confused as to when to use Cases, switches etc. In the case that my script errors out and I have to cancel it and then run it again. I want to have options built in that verify if the folder created exists and if so continue to the next "block" of instructions. As you can see in between each Sleep(15000) is instructions for a new a driver to install. Below you can see my example of how my script starts. There are more drivers after what I have pasted, but these are the first three drivers I want it to run. expandcollapse popup;Prompt to install drivers $answer = MsgBox(4,"Dell D630 Setup","Do you want to install the Dell drivers now?") ;Check Answer If $answer = 7 Then Exit EndIf ;R181862 - Dell System Software BlockInput(1) ShellExecute("E:\XP Setup disk\Drivers\Laptops\D630\Drivers\01 - Dell System Software\R181862.exe") WinWaitActive("System Utilities: Dell Notebook System Software Utility") Send ("{enter}") WinWaitActive("System Utilities: Dell Notebook System Software Utility") Send ("{enter}") WinWaitActive("System Utilities: Dell Notebook System Software Utility") Send ("{enter}") WinWaitActive("System Utilities: Dell Notebook System Software Utility","OK") Send ("{enter}") WinWaitActive("Dell System Software - InstallShield Wizard","Next") Send ("{enter}") WinWaitActive("Dell System Software - InstallShield Wizard","Finish") Sleep (1000) Send ("{DOWN}") Send ("{tab}") Send ("{enter}") BlockInput(0) Sleep(15000) ;R151327 - Broadcom NIC Driver ShellExecute("E:\XP Setup disk\Drivers\Laptops\D630\Drivers\04 - Broadcom\R151327.exe") BlockInput(1) WinWaitActive("Network:Broadcom 57XX Gigabit Integrated Controller,59XX 10/100 Ethernet Controller Driver","Continue") Send ("{enter}") WinWaitActive("Network:Broadcom 57XX Gigabit Integrated Controller,59XX 10/100 Ethernet Controller Driver","Ok") Send ("{enter}") WinWaitActive("Network:Broadcom 57XX Gigabit Integrated Controller,59XX 10/100 Ethernet Controller Driver","Yes") Send ("{enter}") WinWaitActive("Network:Broadcom 57XX Gigabit Integrated Controller,59XX 10/100 Ethernet Controller Driver","Ok") Send ("{enter}") WinWaitActive("Broadcom Gigabit Integrated Controller - InstallShield Wizard","Next") Send ("{enter}") WinWaitActive("Broadcom Gigabit Integrated Controller - InstallShield Wizard","Next") Sleep (3000) Send ("{Up}") Sleep (3000) Send ("{enter}") WinWaitActive("Broadcom Gigabit Integrated Controller - InstallShield Wizard","Install");Install Start Send ("{enter}") WinWaitActive("Broadcom Gigabit Integrated Controller - InstallShield Wizard","Finish");Install Complete Send ("{enter}") BlockInput(0) Sleep (15000) ;R180759 - QuickSet ShellExecute("E:\XP Setup disk\Drivers\Laptops\D630\Drivers\05 - QuickSet\R180759.exe") ;Create Driver Folder BlockInput(1) WinWaitActive("Application: Dell QuickSet Application","Continue") Send ("{enter}") WinWaitActive("Application: Dell QuickSet Application","OK") Send ("{enter}") WinWaitActive("Application: Dell QuickSet Application","Yes") Send ("{enter}") WinWaitActive("Application: Dell QuickSet Application","OK") Send ("{enter}") WinWaitActive("QuickSet - InstallShield Wizard","Next") Send ("{enter}") WinWaitActive("QuickSet - InstallShield Wizard","Next") Send ("{enter}") WinWaitActive("QuickSet - InstallShield Wizard","Install") Send ("{enter}") WinWaitActive("QuickSet - InstallShield Wizard","Finish") Send ("{enter}") BlockInput(0)
khumprp Posted October 11, 2011 Posted October 11, 2011 (edited) Not sure, but hopefully this helps: What if you made functions for each driver installation, or separate scripts. Then create a driver script that calls those functions. Instead of using a wait statement, you could try doing a process check to see if the installation process is still running before you start up a new one too. Also, if you use a driver script, you could get a little more elaborate and have the user select which drivers to install via GUI or msgbox. Edited October 11, 2011 by khumprp
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