MadCoder Posted September 18, 2009 Share Posted September 18, 2009 I have 15+ installation scripts that automate the install process new workstations. Is there a method in Autoit to monitor when 1 script is completed and can move down the list to the next in line. What would be the method for running down the list of scripts to run without all running at once? Would the best method be to do something like this... ;;; Install Python $Python = InIRead("config.ini","Python","Python","") ShellExecute($Python, "") WinWaitClose("Python 2.4.2 Setup") ;; Install Boost C++ Libraries $Boost = InIRead("config.ini","Boost","Boost","") ShellExecute($Boost, "") WinWaitClose("Boost C++ Libraries 1.39 Setup") AND SO ON... Link to comment Share on other sites More sharing options...
omikron48 Posted September 18, 2009 Share Posted September 18, 2009 Didn't you already make a similar topic? http://www.autoitscript.com/forum/index.php?showtopic=102572 Link to comment Share on other sites More sharing options...
MadCoder Posted September 18, 2009 Author Share Posted September 18, 2009 NO. That was for a GUI based. This is just for a simple script. Link to comment Share on other sites More sharing options...
omikron48 Posted September 18, 2009 Share Posted September 18, 2009 (edited) Also have one of those. Just modify it to your specific purpose. The way I do my installations is that I have a script that runs the installation program and does the clicking and typing too. So all my launcher and runner scripts need to do is run my installation scripts. In this case, my runner doesn't have an option to indicate working directory for my installation scripts. Edit: Oh, I also made my installation scripts use _Singleton and set it so it waits for the installation program to close before the installation script terminates. This ensures that only one installation process is active at any given time. expandcollapse popup#include <Misc.au3> _Singleton("Automated Launcher Script") Opt("MustDeclareVars", 1) HotKeySet("^!x", "_Close");Exit on Ctrl+Alt+X Global $ininame = "_process_runner.ini" Global $section = "Processes" If $CmdLine[0] == 1 Then $ininame = $CmdLine[1] EndIf If Not FileExists($ininame) Then MsgBox(0x2030, "Error", "No """ & $ininame & """! Writing empty .ini file.") _CreateINI() Exit EndIf Global $list = IniReadSection($ininame, $section) If @error == 1 Then MsgBox(0x2030, "Error", "Read fail for " & $ininame & "! File empty or invalid.") Exit EndIf Global $pID For $i = 1 To $list[0][0] $pID = Run($list[$i][1]) If @error <> 0 Then MsgBox(0x2030, "Error", "Failed to run " & $list[$i][1] & "!") EndIf ProcessWaitClose($pID) Next Func _CreateINI() Local $file = FileOpen($ininame, 2) FileWriteLine($file, ";INI file for Process Runner") FileWriteLine($file, ";") FileWriteLine($file, ";Key-Value pair format is: KEY = VALUE") FileWriteLine($file, ";") FileWriteLine($file, ";Note: Key can be any value.") FileWriteLine($file, ";") FileWriteLine($file, ";Sample:") FileWriteLine($file, ";[Processes]") FileWriteLine($file, ";sometext1 = someprogram.exe") FileWriteLine($file, ";sometext2 = .\path\someprogram.exe") FileWriteLine($file, ";sometext3 = D:\path\someprogram.exe") FileWriteLine($file, ";") FileWriteLine($file, ";Start entries here:") FileWriteLine($file, "[Processes]") FileClose($file) EndFunc Func _Close() Exit EndFunc Edited September 18, 2009 by omikron48 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