Jump to content

Doesn't compile any more - Need debugging help


MadCoder
 Share

Recommended Posts

I put this together about 6 months ago to deploy new workstations and since we've added quite a few new installations to the mix I went back to add new packages to and and now the original will no longer run and I can't figure the problem out. Any help would be appreciated.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#Include <GUIMenu.au3>

;$Form1 = GUICreate("Form1", 633, 457, 192, 114)
;$MenuItem1 = GUICtrlCreateMenu("E&dit")
;$MenuItem2 = GUICtrlCreateMenuItem("&Edit Configuration File", $MenuItem1)
;$MenuItem3 = GUICtrlCreateMenuItem("E&xit", $MenuItem1)


$Launcher = GUICreate("Workstation Deployment", 366, 465, 278, 170)
$Group1 = GUICtrlCreateGroup(" Select Applications to Install ", 0, 5, 365, 361)
$chkBoost = GUICtrlCreateCheckbox("Boost C++ Libraries", 43, 152, 150, 25)
$chkCUDA = GUICtrlCreateCheckbox("CUDA", 43, 181, 144, 25)
$chkAce = GUICtrlCreateCheckbox("Ace", 43, 239, 128, 25)
$chkFlash = GUICtrlCreateCheckbox("Adobe Flash Plugin", 43, 267, 128, 25)
$chkTortoise = GUICtrlCreateCheckbox("Tortoise SVN", 43, 210, 126, 25)
$chkMozilla = GUICtrlCreateCheckbox("Mozilla Firefox", 43, 36, 118, 25)
$chkIrfanview = GUICtrlCreateCheckbox("Irfanview", 43, 65, 104, 25)
$chkFaststone = GUICtrlCreateCheckbox("Fast Stone Viewer", 43, 94, 118, 25)
$chkDotNET = GUICtrlCreateCheckbox(".NET 2.0", 43, 123, 96, 25)
$Progress = GUICtrlCreateProgress(8, 325, 353, 33)
GUICtrlSetColor(-1, 0x808080)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$chkOmniorb = GUICtrlCreateCheckbox("omniORB", 227, 39, 110, 25)
$chkOpenrtm = GUICtrlCreateCheckbox("Open RTM", 227, 68, 88, 25)
$chkPython = GUICtrlCreateCheckbox("Python", 227, 97, 78, 25)
$chkYAML = GUICtrlCreateCheckbox("pyYAML", 227, 126, 64, 25)
$chkDoxygen = GUICtrlCreateCheckbox("Doxygen", 227, 155, 70, 25)
$chkMatlab = GUICtrlCreateCheckbox("MatLab 2007", 227, 184, 96, 25)
$chkMssdk = GUICtrlCreateCheckbox("Microsoft SDK", 227, 213, 94, 25)
$chkIntel = GUICtrlCreateCheckbox("Intel IPP", 227, 240, 112, 25)
$chkAcrobat = GUICtrlCreateCheckbox("Adobe Acrobat 9", 227, 267, 112, 25)
$chkVbox = GUICtrlCreateCheckbox("Virtual Box", 227, 292, 112, 25)
$txtProgressText = GUICtrlCreateLabel("Current Installation Progress:", 7, 308, 138, 17)
GUICtrlSetColor(-1, 0xA0A0A4)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$btnInstall = GUICtrlCreateButton("&Start Installations", 256, 375, 109, 33, $WS_GROUP)
$btnCancel = GUICtrlCreateButton("&Cancel ", 134, 376, 109, 33, $WS_GROUP)
$Group2 = GUICtrlCreateGroup("", 0, 417, 365, 41)
$txtStatus = GUICtrlCreateLabel("", 8, 435, 200, 17)
; Adding to next version
;$MenuItem1 = GUICtrlCreateMenu("E&dit")
;$MenuItem2 = GUICtrlCreateMenuItem("&Edit Configuration File", $MenuItem1)
;$MenuItem3 = GUICtrlCreateMenuItem("E&xit", $MenuItem1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)


; // Install Locations
$Mozilla = InIRead("config.ini","Mozilla","Mozilla","")
$Irfanview = InIRead("config.ini","Irfanview","Irfanview","")
$dotNET20 = InIRead("config.ini","dotNET20","dotNET20","")
$SDK = InIRead("config.ini","SDK","SDK","")
$FastStone = InIRead("config.ini","FastStone","FastStone","")
$Python = InIRead("config.ini","Python","Python","")
$PyYAML = InIRead("config.ini","PyYAML","PyYAML","")
$TortoiseSVN = InIRead("config.ini","TortoiseSVN","TortoiseSVN","")
$OpenRTM = InIRead("config.ini","OpenRTM","OpenRTM","")
$Vbox = InIRead("config.ini","Vbox","Vbox","")
$omniORB = InIRead("config.ini","omniORB","omniORB","")
$Ace = InIRead("config.ini","Ace","Ace","")
$Boost = InIRead("config.ini","Boost","Boost","")
$Cuda = InIRead("config.ini","Cuda","Cuda","")
$IntelIPP = InIRead("config.ini","IntelIPP","IntelIPP","")
$Intel_lic = InIRead("config.ini","Intel_lic","Intel_lic","")
$Matlab = InIRead("config.ini","Matlab","Matlab","")
$Matlab_name = InIRead("config.ini","Matlab_name","Matlab_name","")
$Matlab_organization = InIRead("config.ini","Matlab_organization","Matlab_organization","")
$Matlab_PLP = InIRead("config.ini","Matlab_PLP","Matlab_PLP","")
$Flash = InIRead("config.ini","Flash","Flash","")
$Acrobat = InIRead("config.ini","Acrobat","Acrobat","")
$Doxygen = InIRead("config.ini","Doxygen","Doxygen","")




MsgBox(4144,"Important - Please Read","Before you run the installation application you must first..." & @CRLF & "" & @CRLF & "Run gpedit.msc, and go to " & @CRLF & "Local Computer Policy->" & @CRLF & "User Configuration->" & @CRLF & "Administrative Templates->" & @CRLF & "Windows Components->" & @CRLF & "Attachment Manager " & @CRLF & "and enable Default risk level for file attachments, and then enable " & @CRLF & "Inclusion list for low risk file types and add to this list the file extensions " & @CRLF & "(eg: .exe; .msi;) ." & @CRLF & "" & @CRLF & "This will stop the Windows Open File Warning from hanging the scripts.")


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $btnInstall
;;;; Start

;; lock user Input
;; DO NOT UNCOMMENT THIS UNTIL YOU'VE TESTED THE SCRIPT ON A NEW WORKSTATION
;BlockInput (1)

GUICtrlSetState($btnInstall, $GUI_HIDE)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Mozilla      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
If GUICtrlRead($chkMozilla) = $GUI_CHECKED Then 
$txtStatus = GUICtrlCreateLabel("Currently Installing: Mozilla Firefox", 8, 435, 200, 17)   
ShellExecute($Mozilla, "")
WinWaitActive("Mozilla Firefox Setup","Welcome to")
Send("{ENTER}")
Sleep (1000)
Send("{ENTER}")
Sleep (1000)
Send("{ENTER}")
WinWaitActive("Mozilla Firefox Setup","Completing the")
Send("{space}{ENTER}")
GUICtrlSetData($Progress, "5")
; fin
Else
EndIf


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL INFANVIEW    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If GUICtrlRead($chkIrfanview) = $GUI_CHECKED Then 
$txtStatus = GUICtrlCreateLabel("Currently Installing: Infanview", 8, 435, 200, 17) 
ShellExecute($Irfanview, "")
WinWaitActive("IrfanView Setup")
Send("{ENTER}{ENTER}{SPACE}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}{SPACE}{ENTER}{ENTER}")
Send("!y")
Send("{enter}")
WinWaitClose("IrfranView Setup")
;Sleep (3000)
WinWaitActive("IrfanView Frequently Asked Questions")
Send("!f")
Send("x")
Sleep (2000)
WinWaitActive("IrfanView")
Send("!f")
Send("x")
GUICtrlSetData($Progress, "10")
Else

EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL .NET 2.0     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
If GUICtrlRead($chkDotNET) = $GUI_CHECKED Then 
    $txtStatus = GUICtrlCreateLabel("Currently Installing: Microsoft .NET 2.0", 8, 435, 200, 17)    
Sleep (20000)
ShellExecute($dotNET20, "")
WinWaitActive("Microsoft .NET Framework 2.0 Setup")
Send("{Enter}")
Sleep (1000)
Send("{tab}{tab}{tab}{tab}{tab}{space}")
;Send ("{enter}")
WinWaitActive("Microsoft .NET Framework 2.0 Setup", "It Is")
Send("{Enter}")
GUICtrlSetData($Progress, "15")
Else
EndIf
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL MS SDK       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkMssdk) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: Microsoft SDK", 8, 435, 200, 17) 
        Sleep (20000)
 ShellExecute($SDK, "")
WinWaitActive("Microsoft Windows SDK","Welcome")
Send("{Enter}")
Sleep (1000)
WinWaitActive("Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5", "End-User")
Send("{TAB}{TAB}{TAB}{LEFT}{ENTER}")
WinWaitActive("Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5", "Install")
Send("{Enter}")
WinWaitActive("Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5", "Installation")
Send("{Enter}")
WinWaitActive("Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5", "Begin")
Send("{Enter}")
WinWaitActive("Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5", "Complete")
Send("{TAB}{TAB}{Enter}")
GUICtrlSetData($Progress, "20")
; fin
 Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL FASTSTONE    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkFaststone) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: Faststone Viewer", 8, 435, 200, 17)  
        Sleep (20000)
ShellExecute($FastStone, "")
WinWaitActive("FastStone Capture 6.5 Setup")
Send ("{Enter}")
WinWaitActive("FastStone Capture 6.5 Setup","License")
Send ("{Enter}")
WinWaitActive("FastStone Capture 6.5 Setup","Choose")
Send ("{Enter}")
WinWaitActive("FastStone Capture 6.5 Setup","Completing")
Send ("{Enter}")
GUICtrlSetData($Progress, "25")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    

;; Install all python / libraries

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Python    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkPython) = $GUI_CHECKED Then 
$txtStatus = GUICtrlCreateLabel("Currently Installing: Python", 8, 435, 200, 17)    
Sleep (20000)

ShellExecute($Python, "")
WinWaitActive("Python 2.4.2 Setup", "Select")
Send ("{Enter}")
WinWaitActive("Python 2.4.2 Setup", "Select Destination")
Send ("{Enter}")
WinWaitActive("Python 2.4.2 Setup", "Customize")
Send ("{Enter}")
WinWaitActive("Python 2.4.2 Setup", "Completing")
Send ("{Enter}")
; fin
GUICtrlSetData($Progress, "30")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Doxygen    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If GUICtrlRead($chkDoxygen) = $GUI_CHECKED Then 
$txtStatus = GUICtrlCreateLabel("Currently Installing: Infanview", 8, 435, 200, 17) 
ShellExecute($Irfanview, "")
WinWaitActive("IrfanView Setup")
Send("{ENTER}{ENTER}{SPACE}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}{SPACE}{ENTER}{ENTER}")
Send("!y")
Send("{enter}")
WinWaitClose("IrfranView Setup")
;Sleep (3000)
WinWaitActive("IrfanView Frequently Asked Questions")
Send("!f")
Send("x")
Sleep (2000)
WinWaitActive("IrfanView")
Send("!f")
Send("x")
GUICtrlSetData($Progress, "10")
Else    
    
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL YAML         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkYaml) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: pyYAML Libraries", 8, 435, 200, 17)  
        Sleep (20000)
ShellExecute($PyYAML, "")
WinWaitActive("Setup")
Send ("{Enter}{Enter}{Enter}")
Sleep (10000)
Send ("{Enter}")
GUICtrlSetData($Progress, "35")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL TORTIOISE    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkTortoise) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: TortoiseSVN", 8, 435, 200, 17)   
        Sleep (20000)
ShellExecute($TortoiseSVN, "")
WinWaitActive("TortoiseSVN 1.6.5.16974 (32 bit) Setup")
SLEEP (1000)
Send("{ENTER}")
SLEEP (1000)
Send("{tab}{tab}{tab}{up}")
SLEEP (1000)
Send("{ENTER}")
SLEEP (1000)
Send("{tab}{enter}")
SLEEP (1000)
Send("{tab}{enter}")
WinWaitActive("TortoiseSVN 1.6.5.16974 (32 bit) Setup","Completing")
Send("{ENTER}")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;    INSTALLER WANTS A RESTART       ;;
;;        & SINCE WE DON'T            ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
WinWaitActive("Installer Information")
Send("{tab}{enter}")
; fin
GUICtrlSetData($Progress, "40")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL OpenRTM    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkOpenrtm) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: OpenRTM", 8, 435, 200, 17)   
Sleep (20000)

ShellExecute($OpenRTM, "")
WinWaitActive("OpenRTM-aist Setup", "Welcome")
Send("{Enter}{space}{ENTER}{enter}{enter}")
WinWaitActive("OpenRTM-aist Setup", "Completed")
Send("{Enter}")
GUICtrlSetData($Progress, "45")

Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL OmniORB    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If GUICtrlRead($chkOmniorb) = $GUI_CHECKED Then 
    $txtStatus = GUICtrlCreateLabel("Currently Installing: OmniORB", 8, 435, 200, 17)   
Sleep (20000)
;; This isn't in English so we're 
;; going with the timed approach.

ShellExecute($omniORB, "")
WinWaitActive("omniORB")
;Sleep (3000)
Send("{Enter}")
Sleep (1000)
Send("{Enter}")
Sleep (1000)
Send("{Enter}")
; wait for install to complete
Sleep (30000)
Send("{Enter}")
GUICtrlSetData($Progress, "50")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Ace    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
If GUICtrlRead($chkAce) = $GUI_CHECKED Then 
    $txtStatus = GUICtrlCreateLabel("Currently Installing: ACE", 8, 435, 200, 17)   
    Sleep (20000)
ShellExecute($Ace, "")
WinWaitActive("The Adaptive Common Environment")
WinWaitActive("The Adaptive Common Environment","Welcome to")
Send("{ENTER}")
WinWaitActive("The Adaptive Common Environment","Select")
Send("{ENTER}")
WinWaitActive("The Adaptive Common Environment","Confirm")
Send("{ENTER}")
WinWaitActive("The Adaptive Common Environment","Installation Complete")
Send("{ENTER}")
; fin
GUICtrlSetData($Progress, "55")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Boost    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkBoost) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: Boost C++ Libraries", 8, 435, 200, 17)   
Sleep (20000)
ShellExecute($Boost, "")
WinWaitActive("Boost C++ Libraries 1.39 Setup")
Send("{ENTER}{ENTER}{ENTER}")
WinWaitActive("Boost C++ Libraries 1.39 Setup", "Select mirror")
Send ("{enter}")
; Select VS2005 
WinWaitActive("Boost C++ Libraries 1.39 Setup", "Select Default Variants")
; Visual Studio 2005
Send("{tab}{space}{tab}{tab}")
; Select variants
Send("{space}{tab}{space}{tab}{space}{tab}{space}{tab}{space}{tab}{space}{tab}{space}{tab}{space}{tab}{TAB}{SPACE}")
WinWaitActive("Boost C++ Libraries 1.39 Setup", "Choose")
Send ("{enter}")
WinWaitActive("Boost C++ Libraries 1.39 Setup", "Choose Install")
Send ("{enter}")
WinWaitActive("Boost C++ Libraries 1.39 Setup", "Boost prebuilt tools")
Send ("Y")
WinWaitActive("Boost C++ Libraries 1.39 Setup", "Setup was")
Send ("{enter}")
; fin
GUICtrlSetData($Progress, "60")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Cuda    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkCUDA) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: Cuda", 8, 435, 200, 17)  
        Sleep (20000)
ShellExecute($Cuda, "")
WinWaitActive("NVIDIA CUDA Toolkit")
;Send("{ENTER}")
;Sleep (1000)
WinWaitActive("NVIDIA CUDA Toolkit","Welcome")
Send("{ENTER}")
WinWaitActive("NVIDIA CUDA Toolkit","License")
Send("{tab}{tab}{tab}{tab}{space}{enter}")
WinWaitActive("NVIDIA CUDA Toolkit","Choose")
Send("{ENTER}")
WinWaitActive("NVIDIA CUDA Toolkit","Ready")
Send("{ENTER}")
WinWaitActive("NVIDIA CUDA Toolkit","InstallShield")
Send("{tab}{tab}{space}{enter}")
GUICtrlSetData($Progress, "65")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Intel IPP    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkIntel) = $GUI_CHECKED Then 
$txtStatus = GUICtrlCreateLabel("Currently Installing: Intel IPP", 8, 435, 200, 17)         
Sleep (20000)
ShellExecute($IntelIPP, "") 
WinWaitActive("Intel(R) Integrated Performance Primitives 6.1")
Send("{Enter}{Enter}")
WinWaitActive("Intel(R) Integrated Performance Primitives 6.1","Welcome")
Send("{Enter}")
Sleep (1000)
Send("{tab}{tab}{tab}{space}")
Sleep (1000)
Send("{Enter}")
Sleep (1000)
;; Select license type
Send("{down}{down}{enter}")
;Lets start the license File Process
Send("{down}{enter}")
sleep (1000)
Send($Intel_lic)
Send("{enter}")
Sleep (1000)
Send("{enter}")
Sleep (1000)
; Start Installation
Send("!i")
WinWaitActive("Intel(R) Integrated Performance Primitives 6.1","Installation")
Send("{enter}")
; fin
GUICtrlSetData($Progress, "70")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL MatLab       ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkMatlab) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: MatLab", 8, 435, 200, 17)    
Sleep (20000)

ShellExecute($Matlab, "")
WinWaitActive("Welcome to the MathWorks Installer")
Sleep (1000)
Send("{Enter}")

WinWaitActive("License Information")

;; define the MATLAB Name                   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Send($Matlab_name)
Sleep (1000)
Send("{tab}")

;; define the MATLAB Organization                   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Send($Matlab_organization)
Sleep (1000)
Send("{tab}")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; define the MATLAB PLP License Key               ;;    
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Send($Matlab_PLP)
Sleep (1000)
Send("{ENTER}")

WinWaitActive("MathWorks Account")
Sleep (1000)
Send("{tab}{tab}{space}{enter}")


WinWaitActive("License Agreement")
Sleep (1000)
Send("{space}{enter}")

WinWaitActive("Installation Type")
Sleep (1000)
Send("{enter}")

WinWaitActive("Product Update Notification")
Sleep (1000)
Send("{enter}")

WinWaitActive("Folder Selection")
Sleep (1000)
Send("{enter}")

WinWaitActive("Confirmation")
Sleep (1000)
Send("{enter}")

WinWaitActive("Product Configuration Notes")
Sleep (1000)
Send("{enter}")

WinWaitActive("Setup Complete")
Sleep (1000)
Send("{enter}")
GUICtrlSetData($Progress, "75")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Flash    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
If GUICtrlRead($chkFlash) = $GUI_CHECKED Then 
    $txtStatus = GUICtrlCreateLabel("Currently Installing: Adobe Flash 9", 8, 435, 200, 17) 
    Sleep (20000)
ShellExecute($Flash, "")
;; wait for it
WinWaitActive("Adobe Flash", "Completed")
Send ("{Enter}")
GUICtrlSetData($Progress, "85")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Acrobat    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    If GUICtrlRead($chkAcrobat) = $GUI_CHECKED Then 
        $txtStatus = GUICtrlCreateLabel("Currently Installing: Adpbe Acrobat 9", 8, 435, 200, 17)   
        Sleep (20000)
ShellExecute($Acrobat, "")
;; wait for it
WinWaitActive("Adobe Reader", "Destination")
Send ("{Enter}")
WinWaitActive("Adobe Reader", "Ready")
Send ("{Enter}")
WinWaitActive("Adobe Reader", "Setup Completed")
Send ("{Enter}")
GUICtrlSetData($Progress, "90")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; INSTALL Vbox         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
If GUICtrlRead($chkVbox) = $GUI_CHECKED Then 
    $txtStatus = GUICtrlCreateLabel("Currently Installing: VirtualBox", 8, 435, 200, 17)    
    Sleep (20000)
ShellExecute($Vbox, "")
WinWaitActive("Sun VirtualBox", "Welcome")
Send("{Enter}")
WinWaitActive("Sun VirtualBox", "End-User")
Send("{tab}{up}{enter}")
WinWaitActive("Sun VirtualBox", "Custom")
Send("{Enter}")
WinWaitActive("Sun VirtualBox", "Select the way")
Send("{Enter}")
WinWaitActive("Sun VirtualBox", "Proceed")
Send("{enter}")
WinWaitActive("Sun VirtualBox", "Ready")
Send("{enter}")
WinWaitActive("Software Installation")
Send("{tab}{tab}{enter}")
WinWaitActive("Software Installation")
Send("{tab}{tab}{enter}")
WinWaitActive("Software Installation")
Send("{tab}{tab}{enter}")
WinWaitActive("Hardware Installation")
Send("{tab}{tab}{enter}")
WinWaitActive("Hardware Installation")
Send("{tab}{tab}{enter}")
WinWaitActive("Hardware Installation")
Send("{tab}{tab}{enter}")
WinWaitActive("Sun VirtualBox", "Click")
Send("{tab}{space}{enter}")
; fin

GUICtrlSetData($Progress, "100")
Else
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;; Release Keyboard / Mouse 
BlockInput (0)

;; Reset Status text
$txtStatus = GUICtrlCreateLabel("", 8, 435, 200, 17)    
 ;;; Alert Finished
 ; fake the install bar to 100 percent compelte
 GUICtrlSetData($Progress, "0")
Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(64,"New Workstation ","Installations complete. ",10)
Select
   Case $iMsgBoxAnswer = -1 
   Case Else                
EndSelect
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Unhide Install Button - We could disable it but this is just as easy
GUICtrlSetState($btnInstall, $GUI_Show)
;; Reset fake Progress Bar  
GUICtrlSetData($Progress, "0")


Case $btnCancel
    Exit
EndSwitch


WEnd
Link to comment
Share on other sites

  • Moderators

MadCoder,

I do not think many here will debug 600+ lines of code for you.

But running Tidy on it (which you could easily have done yourself by pressing Ctrl-T or vis the <Tools> menu in SciTE :evil: ) shows you are not closing an If. Try adding an EndIf on line 654, just above Case $btnCancel.

I hope this helps. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...