Jump to content
abberration

Software Installer (Updated 11/6/2020)

Recommended Posts

Software Installer
version 1.1 - 11/6/2020

This new version (first in 8 years) is a total rewrite of the original. I was not getting notifications on this thread and missed people's questions and requests. I have incorporated some recent requests and will go back further in the posts and consider more upgrades.

The overall look remains the same, but this version brings many changes. The only script breaking change is your old INI file is not compatible with this version. Some new features:

  • When you add software to the Software folder (you need to create this folder in the same directory as your script), you will get prompted to configure the software. If you say yes, it will bring up a form where you can type up a display name for the software (instead of the installer name. Ex: 7z1900-x64.msi can be displayed as 7-Zip), the switch to use, software description and what category tab you want it to appear in. This feature creates and updates an INI file for you, so you don't have to do it manually.
  • While configuring your software, there is a drop-down menu with installer types (Inno, NSIS, MSI, Installshield, Wise, etc). If you know the installer type, it narrows down the switches in the Switch drop-down menu to only show switches for that installer type. If none of the switches are what you need (ex: Firefox uses -ms), just manually type the needed switch in the Switch drop-down menu.
  • By default, only unconfigured software shows up in the Configure Software menu. There is a checkbox to show all software, where you can double-click the software and modify it's data.
  • There is an option to edit the order in which the software is installed. If selected, a form will pop up after you press the Install Selected Software button and before the installation begins. On this form, you can select software installers and move them up and down in the list.

I will watch this thread more closely and continue to work on this project. This was one of my first "big" projects and one of my favorites. I'm surprised I haven't revisited sooner.

Enjoy!

#include <Array.au3>
#include <File.au3>
#include <GDIPlus.au3>
#include <GUIConstants.au3>
#include <GuiTab.au3>
#include <GuiListView.au3>
#include <GuiMenu.au3>
#include <ProgressConstants.au3>

Global $fIniConfig = @ScriptDir & "\Config.ini"
Global $sSWDir = @ScriptDir & "\Software\"
Global $sVersion = "1.1"

; Main GUI
$Form1 = GUICreate("Software Installer", 633, 451)
$Tab1 = GUICtrlCreateTab(16, 8, 601, 377)
$TabSheet1 = GUICtrlCreateTabItem("Audio/Video/Photo")
$ListView1 = GUICtrlCreateListView("Software Name|Description", 24, 40, 582, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet2 = GUICtrlCreateTabItem("System Tools")
$ListView2 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView2, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet3 = GUICtrlCreateTabItem("Internet")
$ListView3 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView3, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet4 = GUICtrlCreateTabItem("Games")
$ListView4 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView4, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet5 = GUICtrlCreateTabItem("Miscellaneous")
$ListView5 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView5, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet6 = GUICtrlCreateTabItem("Patches/Updates")
$ListView6 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView6, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet7 = GUICtrlCreateTabItem("Productivity")
$ListView7 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView7, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
GUICtrlCreateTabItem("") ; This ends the tab item creation
$g1Checkbox1 = GUICtrlCreateCheckbox("Prompt to edit software installation order", 16, 400, 220, 17)
;~ GUICtrlSetState(-1, $GUI_CHECKED) ; Enable this if you want.
$g1Button1 = GUICtrlCreateButton("Install Selected Software", 398, 395, 219, 25, 0)
$MenuItem1 = GUICtrlCreateMenu("File")
$MenuItem1a = GUICtrlCreateMenuItem("Select All", $MenuItem1)
$MenuItem2 = GUICtrlCreateMenuItem("Unselect All", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("Exit", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenu("Settings")
$MenuItem5 = GUICtrlCreateMenuItem("Edit Software Configuration", $MenuItem4)
$MenuItem6 = GUICtrlCreateMenu("Help")
$MenuItem7 = GUICtrlCreateMenuItem("Help Topics", $MenuItem6)
$MenuItem8 = GUICtrlCreateMenuItem("About", $MenuItem6)
GUISetState(@SW_SHOW)

$aSoftwareList = _FileListToArrayRec(@ScriptDir & "\Software", "*.exe;*.msi", 1) ; List all software in Software folder.
If NOT IsArray ($aSoftwareList) Then ; Easy fix for program crashing if no software is in the Software folder.
    MsgBox(262144, "Error", "No software installers found in the Software folder." & @CRLF & "This program cannot function without any software installers." & @CRLF & "Add some to the folder and restart the program.")
    Exit
EndIf

For $i = 1 To 5 ; Add columns for other data.
    _ArrayColInsert($aSoftwareList, 1)
Next
Global $aUnconfiguredSW[$aSoftwareList[0][0]+1][5]
$aUnconfiguredSW[0][0] = 0
_CheckForNewSoftware($aSoftwareList)
If $aUnconfiguredSW[0][0] > 0 Then ; Get a list of all software that has not been configured.
    $iQueryUser = _QueryUser()
    If $iQueryUser = 1 Then
        _SWConfiguration()
    EndIf
EndIf
_Populate() ; Loads the software in the Software folder into the various lists.

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $g1Button1
            _InstallSelectedSoftware()
        Case $MenuItem1a
            _SelectAll(True)
        Case $MenuItem2
            _SelectAll(False)
        Case $MenuItem3
            Exit
        Case $MenuItem5
            _SWConfiguration()
        Case $MenuItem7
            _HelpTopics()
        Case $MenuItem8
            _About()
    EndSwitch
WEnd

Func _Populate()
    ; Find all files in the Software folder and populate the tabs with the installers.
    For $i = 1 To 7 ; Fill out the master array with data
        _GUICtrlListView_DeleteAllItems(Eval("ListView" & $i))
    Next
    For $i = 1 To $aSoftwareList[0][0]
        $sDisplayName = IniRead($fIniConfig, $aSoftwareList[$i][0], "DisplayName", $aSoftwareList[$i][0])
        $sCategory = IniRead($fIniConfig, $aSoftwareList[$i][0], "Category", "")
        If $sCategory = "" Then
            $sCategory = 5
        EndIf
        $sDescription = IniRead($fIniConfig, $aSoftwareList[$i][0], "Description", "")
        $checked = IniRead($fIniConfig,$aSoftwareList[$i][0],"IsDefault", "")
        $aSoftwareList[$i][1] = $sDisplayName
        $aSoftwareList[$i][2] = $sCategory
        $aSoftwareList[$i][3] = $sDescription
        $aSoftwareList[$i][4] = $checked
    Next

    For $i = 1 To $aSoftwareList[0][0] ; Populate the tabs with items
        $iCategory = IniRead($fIniConfig, $aSoftwareList[$i][0], "Category", 5)
        GUICtrlCreateListViewItem($aSoftwareList[$i][1] & "|" & $aSoftwareList[$i][3], (Eval("ListView" & $iCategory)))
        If $aSoftwareList[$i][4] = 1 Then
            $iI = _GUICtrlListView_FindText((Eval("ListView" & $iCategory)), $aSoftwareList[$i][1])
            _GUICtrlListView_SetItemChecked((Eval("ListView" & $iCategory)), $iI, True)       ;Set checked radiobox of last found control
        EndIf
    Next
EndFunc   ;==>_Populate

Func _InstallSelectedSoftware()
    GUISetState(@SW_DISABLE, $Form1)
    Local $sExit = ""
    $Form4 = GUICreate("Installing Software", 443, 172)
    $g4Label1 = GUICtrlCreateLabel("Installing:", 16, 16, 148, 17)
    $g4Label2 = GUICtrlCreateLabel("", 16, 40, 418, 19)
    GUICtrlSetFont(-1, 10, 400, 0, "Arial Rounded MT Bold")
    GUICtrlSetColor(-1, 0x008080)
    $g4Label3 = GUICtrlCreateLabel("File Size:", 16, 64, 146, 17)
    $g4Label4 = GUICtrlCreateLabel("Total Progress:", 16, 112, 75, 17)
    $g4Progress1 = GUICtrlCreateProgress(16, 136, 414, 17)

    Local $aInstallList[$aSoftwareList[0][0] + 1][4]
    $iInstallListSize = 0
    For $i = 1 To 7
        $iItemCount = _GUICtrlListView_GetItemCount(Eval("ListView" & $i))
        For $j = 1 To $iItemCount
            $vItemChecked = _GUICtrlListView_GetItemChecked(Eval("ListView" & $i), $j - 1)
            If $vItemChecked = TRUE Then
                $iInstallListSize += 1
                $aInstallList[0][0] = $iInstallListSize
                $sItemName = _GUICtrlListView_GetItemText(Eval("ListView" & $i), $j - 1)
                $iArrayPos = _ArraySearch($aSoftwareList, $sItemName, Default, Default, Default, Default, Default, 1)
                $sSWInstaller = $aSoftwareList[$iArrayPos][0]
                $sSwitch = IniRead($fIniConfig, $sSWInstaller, "Switch", "")
                $aInstallList[$iInstallListSize][0] = $sSWDir & $sSWInstaller
                $aInstallList[$iInstallListSize][1] = $sSwitch
                $aInstallList[$iInstallListSize][2] = $sItemName
                $aInstallList[$iInstallListSize][3] = $sSWInstaller

            EndIf
        Next
    Next

    ReDim $aInstallList[$aInstallList[0][0] + 1][4]
    $iInstallOrder = GUICtrlRead($g1Checkbox1)
    If $iInstallOrder = 1 Then ; If the user wants to alter installation order, this pulls up the Gui.
        $aInstallList = _InstallOrder($aInstallList)
    EndIf

    GUISetState(@SW_SHOW, $Form4) ; The Installing Software screen has been hidden until now.

    For $i = 1 To $aInstallList[0][0] ; Set info into Gui and install the software.
        If FileExists($aInstallList[$i][0]) Then
            GUICtrlSetData($g4Label1, "Installing: " & $i & " of " & $aInstallList[0][0])
            GUICtrlSetData($g4Label2, $aInstallList[$i][2]) ; Name of software
            GUICtrlSetData($g4Label3, "File Size: " & Round(FileGetSize($aInstallList[$i][0])/1024000, 1) & " MB")
            If StringRight($aInstallList[$i][0], 4) = ".msi" Then
                $sInstallString = '"' & $aInstallList[$i][0] & '" ' & $aInstallList[$i][1]
                Run("msiexec /i " & $sInstallString)
            Else
                RunWait('"' & $aInstallList[$i][0] & '" ' & $aInstallList[$i][1])
            EndIf
        EndIf
        GUICtrlSetData($g4Progress1, $i/$aInstallList[0][0]*100)
    Next
    $sExit = "EXIT"
    Do
        Sleep(500)
    Until $sExit = "EXIT"

    GUISetState(@SW_ENABLE, $Form1)
    GUIDelete($Form4)
    _SelectAll(False)
EndFunc

Func _SelectAll($TF) ; Sending TRUE or FALSE to select all or unselect all.
    For $i = 1 To 7
        $iItemCount = _GUICtrlListView_GetItemCount(Eval("ListView" & $i))
        For $j = 1 To $iItemCount
            _GUICtrlListView_SetItemChecked(Eval("ListView" & $i), $j - 1, $TF)
        Next
    Next
EndFunc   ;==>_SelectAll

Func _HelpTopics()
    $Form2 = GUICreate("Help", 633, 447)
    $Label1 = GUICtrlCreateLabel("", 8, 16, 612, 425)
    GUICtrlSetData(-1, "This program uses silent switches to install software without user interaction. " & _
    "To use this functionality, you can edit the Config.ini file to add software and their switches. Example: " & _
    @CRLF & @CRLF & "[7z1900-x64.exe] ; <--- This is the actual file name" & _
    @CRLF & "Description=YourDescripton" & @CRLF & "Switch=YourSwitcth" & @CRLF & "Category=YourCategory" & @CRLF & "etc... etc..." & _
    @CRLF & @CRLF & "Here are some common switches for various installers: (more included in this program's features)" & @CRLF & @CRLF & "/silent used for Inno Setup installers" & @CRLF & _
    "/verysilent used for Inno Setup installers" & @CRLF & "/S used for Nullsoft (aka NSIS) installers" & @CRLF & "/s used for Wise installers" & _
    @CRLF & "-s used for Ghost installers" & @CRLF & "-ms used for Mozilla installers" & @CRLF & "/quiet used for Microsoft installers" & @CRLF & _
    "/qb used for Microsoft installers" & @CRLF & "/qn used for  Microsoft installers" & @CRLF & "/passive used for Microsoft installers" & @CRLF & _
    "/Q used for Microsoft installers")
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($Form2)
                ExitLoop
        EndSwitch
    WEnd
EndFunc   ;==>_HelpTopics

Func _CheckForNewSoftware($aSoftwareList)
    Local $aConfigFileSW = IniReadSectionNames($fIniConfig)
        $iArrayPos = 1
        For $i = 1 To $aSoftwareList[0][0]
            If _ArraySearch($aConfigFileSW, $aSoftwareList[$i][0]) < 1 Then
                $aUnconfiguredSW[$iArrayPos][0] = $aSoftwareList[$i][0]
                $aUnconfiguredSW[0][0] = $iArrayPos
                $iArrayPos += 1
            EndIf
        Next
EndFunc

Func _SWConfiguration()
    GUISetState(@SW_DISABLE, $Form1)
    $Form2 = GUICreate("Configure Software", 620, 470)
    Global $g2List = GUICtrlCreateList("", 8, 24, 602, 218)
    $g2Checkbox1 = GUICtrlCreateCheckbox("Show All Software", 8, 240, 121, 17)
    $g2Label1 = GUICtrlCreateLabel("Display Name For Software:", 8, 264, 250, 17)
    $g2Input1 = GUICtrlCreateInput("", 8, 280, 250, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Label2 = GUICtrlCreateLabel("Installer Type (optional):", 8, 320, 116, 17)
    $g2Combo1 = GUICtrlCreateCombo("", 8, 336, 250, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Label3 = GUICtrlCreateLabel("Silent Switch To Be Used:", 8, 376, 128, 17)
    $g2Combo2 = GUICtrlCreateCombo("", 8, 392, 250, 25)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Label4 = GUICtrlCreateLabel("Software Description (optional):", 300, 264, 250, 17)
    $g2Input2 = GUICtrlCreateInput("", 300, 280, 250, 21)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Label5 = GUICtrlCreateLabel("Category:", 300, 320, 128, 17)
    $g2Combo3 = GUICtrlCreateCombo("", 300, 336, 250, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Label6 = GUICtrlCreateLabel("Double-Click Each Software To Configure. When Finished, Click The Save Button", 8, 6, 391, 17)
    $g2Label7 = GUICtrlCreateLabel("Editing: ", 8, 240, 602, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x008000)
    GUICtrlSetBkColor(-1, 0xC0DCC0)
    GUICtrlSetState(-1, $GUI_HIDE)
    $g2Checkbox2 = GUICtrlCreateCheckbox("This Software Defaults To Selected (Check Mark On)", 300, 392, 300, 17)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Button1 = GUICtrlCreateButton("Edit A Different Software", 300, 430, 160, 25, $WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $g2Button2 = GUICtrlCreateButton("Save Data", 480, 430, 100, 25, $WS_GROUP)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUISetState(@SW_SHOW)
    _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW)

    Global $idDummy = GUICtrlCreateDummy()
    GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                GUISetState(@SW_ENABLE, $Form1)
                GUIDelete($Form2)
                _Populate()
                ExitLoop
            Case $idDummy
                _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aSoftwareList)
                GUICtrlSetData($g2Label7, "Editing: " & GUICtrlRead($idDummy))
                $sDesc = IniRead($fIniConfig, GUICtrlRead($idDummy), "Description", "")
                $sFullSwitches = "-s|/silent|/verysilent|/sp- /silent /norestart|/verysilent /norestart|/S|/S /NCRC|/passive|/passive /norestart|/u|/u /z|/q|/q /r:n|/q:a|/qb|/qn|/q:a /r:n|/S|/s"
                $sSwitch = IniRead($fIniConfig, GUICtrlRead($idDummy), "Switch", $sFullSwitches)
                Local $aCategories[8] = ["7","Audio/Video/Photo", "System Tools", "Internet", "Games", "Miscellaneous", "Patches/Updates", "Productivity"]
                $iCategory = IniRead($fIniConfig, GUICtrlRead($idDummy), "Category", "5")
                $sCategory = $aCategories[$iCategory]
                $sDisplayName = IniRead($fIniConfig, GUICtrlRead($idDummy), "DisplayName", "")
                $sIsDefault = IniRead($fIniConfig, GUICtrlRead($idDummy), "IsDefault", "")
                GUICtrlSetData($g2Input1, $sDisplayName)
                GUICtrlSetData($g2Combo2, $sSwitch)
                GUICtrlSetData($g2Input2, $sDesc)
                GUICtrlSetData($g2Combo3, $sCategory)
                If $sIsDefault = 1 Then
                    GUICtrlSetState($g2Checkbox2, $GUI_CHECKED)
                EndIf
                _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, 1) ; enable
            Case $g2Button1
                GUICtrlSetState($g2Checkbox1, $GUI_UNCHECKED)
                _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW)
                _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, 0)
            Case $g2Combo1
                _SetSwitchData($g2Combo1, $g2Combo2, $g2Combo3)
            Case $g2Checkbox1
                $iCBRead = GUICtrlRead($g2Checkbox1)
                If $iCBRead = 1 Then
                    _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aSoftwareList)
                Else
                    _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW)
                EndIf
            Case $g2Button2
                $sCurrentSW = StringTrimLeft(GUICtrlRead($g2Label7), 9)
                $sDesc = IniWrite($fIniConfig, $sCurrentSW, "Description", GUICtrlRead($g2Input2))
                $sSwitch = IniWrite($fIniConfig, $sCurrentSW, "Switch", GUICtrlRead($g2Combo2))
                Local $aCategories[8] = ["7","Audio/Video/Photo", "System Tools", "Internet", "Games", "Miscellaneous", "Patches/Updates", "Productivity"]
                $sCategory = GUICtrlRead($g2Combo3)
                $iArrayPos = _ArraySearch($aCategories, $sCategory)
                IniWrite($fIniConfig, $sCurrentSW, "Category", $iArrayPos)
                $sDisplayName = IniWrite($fIniConfig, $sCurrentSW, "DisplayName", GUICtrlRead($g2Input1))
                $sIsDefault = IniWrite($fIniConfig, $sCurrentSW, "IsDefault", GUICtrlRead($g2Checkbox2))
                $iArrayPos = _ArraySearch($aUnconfiguredSW, $sCurrentSW)
                If $iArrayPos > 0 Then
                    _ArrayDelete($aUnconfiguredSW, $iArrayPos)
                    $aUnconfiguredSW[0][0] -= 1
                EndIf
                _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aUnconfiguredSW)
                GUICtrlSetState($g2Checkbox1, $GUI_UNCHECKED)
                _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, 0)
        EndSwitch
    WEnd
EndFunc

Func _SetSwitchData($g2Combo1, $g2Combo2, $g2Combo3)
    $sInstaller = GUICtrlRead($g2Combo1)
    GUICtrlSetData($g2Combo2, "")
    If $sInstaller = "Ghost Installer" Then
        GUICtrlSetData($g2Combo2, "-s", "-s")
    ElseIf $sInstaller = "Inno Setup" Then
        GUICtrlSetData($g2Combo2, "/silent|/verysilent|/sp- /silent /norestart|/verysilent /norestart", "/silent")
    ElseIf $sInstaller = "Install Shield" Then
        GUICtrlSetData($g2Combo2, "/S|/S /NCRC", "/S")
    ElseIf $sInstaller = "Microsoft Hotfix Package" Then
        GUICtrlSetData($g2Combo2, "/passive|/passive /norestart|/u|/u /z|/q|/q /r:n|/q:a|/qb|/qn|/q:a /r:n", "/passive /norestart")
        GUICtrlSetData($g2Combo3, "Patches/Updates")
    ElseIf $sInstaller = "MSI Package" Then
        GUICtrlSetData($g2Combo2, "/qb|/qn", "/qb")
    ElseIf $sInstaller = "Nullsoft (NSIS)" Then
        GUICtrlSetData($g2Combo2, "/S", "/S")
    ElseIf $sInstaller = "Wise Installer" Then
        GUICtrlSetData($g2Combo2, "/s", "/s")
    Else
        GUICtrlSetData($g2Combo2, "-s|/silent|/verysilent|/sp- /silent /norestart|/verysilent /norestart|/S|/S /NCRC|/passive|/passive /norestart|/u|/u /z|/q|/q /r:n|/q:a|/qb|/qn|/q:a /r:n|/S|/s")
    EndIf
EndFunc

Func _EnableDisableControls($g2Input1, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input2, $g2Button1, $g2Button2, $g2Checkbox1, $g2Checkbox2, $g2Label7, $g2List, $01)
    GUICtrlSetState($g2Input1, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Combo1, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Combo2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Combo3, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Input2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Checkbox1, ($01 = 1) ? $GUI_HIDE : $GUI_SHOW)
    GUICtrlSetState($g2Checkbox2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Button1, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Button2, ($01 = 1) ? $GUI_ENABLE : $GUI_DISABLE)
    GUICtrlSetState($g2Label7, ($01 = 1) ? $GUI_SHOW : $GUI_HIDE)
    GUICtrlSetState($g2List, ($01 = 1) ? $GUI_DISABLE : $GUI_ENABLE)
EndFunc

Func _ClearAndSetInputs($g2List, $g2Combo1, $g2Combo2, $g2Combo3, $g2Input1, $g2Input2, $g2Label7, $g2Checkbox1, $g2Checkbox2, $aSW, $iSWList = 0)
    GUICtrlSetData($g2List, "")
    GUICtrlSetData($g2Input1, "")
    GUICtrlSetData($g2Input2, "")
    GUICtrlSetData($g2Combo1, "")
    GUICtrlSetData($g2Combo2, "")
    GUICtrlSetData($g2Combo3, "")
    GUICtrlSetData($g2Combo1, "Ghost Installer|Inno Setup|Install Shield|Microsoft Hotfix Package|MSI Package|Nullsoft (NSIS)|Wise Installer")
    _SetSwitchData($g2Combo1, $g2Combo2, $g2Combo3)
    GUICtrlSetData($g2Combo3, "Audio/Video/Photo|System Tools|Internet|Games|Miscellaneous|Patches/Updates|Productivity", "Miscellaneous")
    GUICtrlSetState ($g2Checkbox2, $GUI_UNCHECKED)
    GUICtrlSetData($g2List, "")
    $iIsChecked = GUICtrlRead($g2Checkbox1)
    If IsArray($aSW) Then
        For $i = 1 To $aSW[0][0]
            GUICtrlSetData($g2List, $aSW[$i][0])
        Next
    EndIf
EndFunc

Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
    Local $hWndFrom, $iIDFrom, $iCode, $hWndEdit
    $hWndFrom = $lParam
    $iIDFrom = _WinAPI_LoWord($wParam)
    $iCode = _WinAPI_HiWord($wParam)
    If $iCode = $LBN_DBLCLK AND $iIDFrom = $g2List Then
        $sClicked = GUICtrlRead($g2List)
        GUICtrlSendToDummy($idDummy, $sClicked)
    EndIf
EndFunc

Func _InstallOrder($aInstallList)
    GUISetState(@SW_DISABLE, $Form1)
    $Form5 = GUICreate("Installation Order", 423, 292)
    $g5Label1 = GUICtrlCreateLabel("Highlight software and click the up and down arrows to change order of installation", 16, 3, 393, 17)
    $g5List1 = GUICtrlCreateList("", 16, 24, 321, 253, $LBS_NOTIFY)
    $g5Button1 = GUICtrlCreateButton(ChrW(8593), 344, 112, 35, 25, $WS_GROUP)
    $g5Button2 = GUICtrlCreateButton(ChrW(8595), 344, 144, 35, 25, $WS_GROUP)
    $g5Button3 = GUICtrlCreateButton("Done", 351, 251, 59, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    For $i = 1 To $aInstallList[0][0]
        GUICtrlSetData($g5List1, $aInstallList[$i][3])
    Next

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                GUISetState(@SW_ENABLE, $Form1)
                GUIDelete($Form5)
                Return $aInstallList
                ExitLoop
            Case $g5Button1
                $sRead = GUICtrlRead($g5List1)
                If $sRead <> "" Then
                    $iArrayPos = _ArraySearch($aInstallList, $sRead, Default, Default, Default,Default,Default, 3)
                    If $iArrayPos > 1 Then
                        _ArraySwap($aInstallList, $iArrayPos, $iArrayPos - 1)
                    EndIf
                    GUICtrlSetData($g5List1, "")
                    For $i = 1 To $aInstallList[0][0]
                        GUICtrlSetData($g5List1, $aInstallList[$i][3])
                    Next
                EndIf
            Case $g5Button2
                $sRead = GUICtrlRead($g5List1)
                If $sRead <> "" Then
                    $iArrayPos = _ArraySearch($aInstallList, $sRead, Default, Default, Default,Default,Default, 3)
                    If $iArrayPos < $aInstallList[0][0] Then
                        _ArraySwap($aInstallList, $iArrayPos, $iArrayPos + 1)
                    EndIf
                    GUICtrlSetData($g5List1, "")
                    For $i = 1 To $aInstallList[0][0]
                        GUICtrlSetData($g5List1, $aInstallList[$i][3])
                    Next
                EndIf
            Case $g5Button3
                GUISetState(@SW_ENABLE, $Form1)
                GUIDelete($Form5)
                Return $aInstallList
                ExitLoop
        EndSwitch
    WEnd
EndFunc

Func _QueryUser()
    $iShowConfigSWDiag = IniRead($fIniConfig, "Settings", "ShowConfigSWDiag", 4)
    If $iShowConfigSWDiag = 4 Then
        GUISetState(@SW_DISABLE, $Form1)
        $iStyle2 = BitOr( $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)
        $Form6 = GUICreate("Attention", 423, 119, Default, Default, $iStyle2)
        $g6Label1 = GUICtrlCreateLabel("You have unconfigured software. Do you want to configure them now?", 32, 32, 338, 17)
        $g6Button1 = GUICtrlCreateButton("Yes", 184, 72, 99, 25, $WS_GROUP)
        $g6Button2 = GUICtrlCreateButton("No", 296, 72, 99, 25, $WS_GROUP)
        $g6Checkbox1 = GUICtrlCreateCheckbox("Do not ask again", 32, 80, 121, 17)
        GUISetState()
        $g6ExitButton = _GUICtrlMenu_GetSystemMenu($Form6)
        _GUICtrlMenu_EnableMenuItem($g6ExitButton, $SC_CLOSE, 1, False)

        While 1
            $nMsg = GUIGetMsg()
            Switch $nMsg
                Case $g6Button1
                    $iCBRead = GUICtrlRead($g6Checkbox1)
                    If $iCBRead = 1 Then
                        IniWrite($fIniConfig, "Settings", "ShowConfigSWDiag", $iCBRead)
                    EndIf
                    GUISetState(@SW_ENABLE, $Form1)
                    GUIDelete($Form6)
                    Return 1
                    ExitLoop
                Case $g6Button2
                    $iCBRead = GUICtrlRead($g6Checkbox1)
                    If $iCBRead = 1 Then
                        IniWrite($fIniConfig, "Settings", "ShowConfigSWDiag", $iCBRead)
                    EndIf
                    GUISetState(@SW_ENABLE, $Form1)
                    GUIDelete($Form6)
                    Return 0
                    ExitLoop
            EndSwitch
        WEnd
    EndIf
EndFunc

Func _About()
    GUISetState(@SW_DISABLE, $Form1)
    Local $Form3, $hGraphic
    Local Const $iWidth = 400, $iHeight = 150, $iBgColor = 0x303030
    $Form3 = GUICreate("About Software Installer", 400, 300)
    GUISetBkColor($iBgColor, $Form3)
    GUISetState(@SW_SHOW)
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form3)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;sets the graphics object rendering quality (antialiasing)
    Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFEE88BB)
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form3)
    _GDIPlus_GraphicsFillRect($hGraphic, 0, 150, 400, 300, $hBrush)

    $Label1 = GUICtrlCreateLabel("Software Installer", 48, 16, 304, 44)
    GUICtrlSetFont(-1, 26, 400, 0, "Arial Rounded MT Bold")
    GUICtrlSetColor(-1, 0xC0C0C0)
    $Label2 = GUICtrlCreateLabel("Version " & $sVersion, 48, 56, 84, 22)
    GUICtrlSetFont(-1, 12, 400, 0, "Arial")
    GUICtrlSetColor(-1, 0xC0C0C0)
    $Label3 = GUICtrlCreateLabel("Click here to go to the home page for this software", 48, 240, 300, 21)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000080)
    GUICtrlSetBkColor(-1, 0x434E54)
    GUICtrlSetCursor (-1, 0)
    $Label4 = GUICtrlCreateLabel("Scripted with AutoIt", 48, 200, 115, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x808080)
    $Label5 = GUICtrlCreateLabel("This software is designed to help automate unattended and/or silent software installation.", 56, 96, 282, 40)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x00FFFF)

    While 1
        $nmsg = GUIGetMsg()
        Switch $nMsg
            Case $Label3
                ShellExecute ("https://www.autoitscript.com/forum/topic/143730-software-installer/")
            Case $GUI_EVENT_CLOSE
                _GDIPlus_BrushDispose($hBrush)
                _GDIPlus_GraphicsDispose($hGraphic)
                _GDIPlus_Shutdown()
                GUISetState(@SW_ENABLE, $Form1)
                GUIDelete($Form3)
                ExitLoop
        EndSwitch
    WEnd
EndFunc

Archive of version 1.0:

Spoiler

Version 1.0 script:

#include <GUIConstants.au3>
#include <GuiListView.au3>
#include <Array.au3>
#include <File.au3>

Global $iniFile = @ScriptDir & "\Config.ini"
Global $scriptDir = @ScriptDir

; Main GUI
$Form1 = GUICreate("Software Installer", 633, 451)

$Tab1 = GUICtrlCreateTab(16, 8, 601, 377)
$TabSheet1 = GUICtrlCreateTabItem("Audio/Video/Photo")
$ListView1 = GUICtrlCreateListView("Software Name|Description", 24, 40, 582, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet2 = GUICtrlCreateTabItem("Computer Maintenance")
$ListView2 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView2, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet3 = GUICtrlCreateTabItem("Internet")
$ListView3 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView3, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet4 = GUICtrlCreateTabItem("Games")
$ListView4 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView4, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet5 = GUICtrlCreateTabItem("Miscellaneous")
$ListView5 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView5, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet6 = GUICtrlCreateTabItem("Productivity")
$ListView6 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView6, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
GUICtrlCreateTabItem("") ; This ends the tab item creation
$Button1 = GUICtrlCreateButton("Install Selected Software", 398, 395, 219, 25, 0)
$MenuItem1 = GUICtrlCreateMenu("File")
$MenuItem2 = GUICtrlCreateMenuItem("Unselect All", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("Exit", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenu("Help")
$MenuItem5 = GUICtrlCreateMenuItem("Help Topics", $MenuItem4)
$MenuItem6 = GUICtrlCreateMenuItem("About", $MenuItem4)
_Populate()
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _InstallSelectedSoftware()
        Case $MenuItem2
            _UnselectAll()
        Case $MenuItem3
            Exit
        Case $MenuItem5
            _HelpTopics()
        Case $MenuItem6
            _AboutProject()
    EndSwitch
WEnd

Func _Populate()
    ; Find all files in the Software folder and populate the tabs with the installers.
    $f = FileFindFirstFile("Software/*.*")
    Dim $array[1]
    $i = 0
    Do
        $s = FileFindNextFile($f)
        If Not @error Then
            $array[$i] = $s
            $i += 1
            ReDim $array[$i + 1]
        EndIf
    Until @error
    ReDim $array[$i]

    For $i = 1 To UBound($array) Step 1
        $category = IniRead($iniFile, $array[$i - 1], "Category", "5")
        $desc = IniRead($iniFile, $array[$i - 1], "Desc", "")
        If $category = 1 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView1)
        ElseIf $category = 2 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView2)
        ElseIf $category = 3 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView3)
        ElseIf $category = 4 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView4)
        ElseIf $category = 6 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView6)
        Else
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView5)
        EndIf
    Next
EndFunc   ;==>_Populate

Func _InstallSelectedSoftware()
    Dim $sArray[1]

    ; Find which items were selected by user on all six tabs
    $count = _GUICtrlListView_GetItemCount($ListView1)
    $aCount = 0
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView1, $i - 1) = True Then
            $sArray[$aCount] = _GUICtrlListView_GetItemText($ListView1, $i - 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
    Next

    $count = _GUICtrlListView_GetItemCount($ListView2)
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView2, $i - 1) = True Then
            $sArray[$aCount] = _GUICtrlListView_GetItemText($ListView2, $i - 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
    Next

    $count = _GUICtrlListView_GetItemCount($ListView3)
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView3, $i - 1) = True Then
            $sArray[$aCount] = _GUICtrlListView_GetItemText($ListView3, $i - 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
    Next

    $count = _GUICtrlListView_GetItemCount($ListView4)
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView4, $i - 1) = True Then
            $sArray[$aCount] = _GUICtrlListView_GetItemText($ListView4, $i - 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
    Next

    $count = _GUICtrlListView_GetItemCount($ListView5)
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView5, $i - 1) = True Then
            $sArray[$aCount] = _GUICtrlListView_GetItemText($ListView5, $i - 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
    Next

    $count = _GUICtrlListView_GetItemCount($ListView6)
    For $i = 1 To $count Step 1
        If _GUICtrlListView_GetItemChecked($ListView6, $i - 1) = True Then
            $sArray[$aCount] = _GUICtrlListView_GetItemText($ListView6, $i - 1)
            ReDim $sArray[UBound($sArray) + 1]
            $aCount += 1
        EndIf
    Next

    ; Begin installing selected software
    ProgressOn("Software Installer", "Installing", "", -1, -1, 16)
    For $i = 1 To UBound($sArray) - 1 Step 1
        $fileName = $sArray[$i - 1]
        $switch = IniRead($iniFile, $fileName, "Switch", "")
        Local $szDrive, $szDir, $szFName, $szExt
        $extension = StringRight($fileName, 3)
        If $extension = "msi" Then
            Run("msiexec /i " & '"' & $scriptDir & "Software" & $fileName & '" ' & $switch) ; For MSI type installers
        Else
            RunWait('"' & $scriptDir & "Software" & $fileName & '"' & " " & $switch) ; For EXE installers
        EndIf
        ProgressSet($i / (UBound($sArray) - 1) * 100, Round($i / (UBound($sArray) - 1) * 100, 0) & "%", "Installing " & $i & " of " & UBound($sArray) - 1)
    Next
    ProgressOff()
EndFunc   ;==>_InstallSelectedSoftware

Func _UnselectAll()
    $count = _GUICtrlListView_GetItemCount($ListView1)
    For $i = 1 To $count Step 1
        _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    Next

    $count = _GUICtrlListView_GetItemCount($ListView2)
    For $i = 1 To $count Step 1
        _GUICtrlListView_SetItemChecked($ListView2, $i - 1, False)
    Next

    $count = _GUICtrlListView_GetItemCount($ListView3)
    For $i = 1 To $count Step 1
        _GUICtrlListView_SetItemChecked($ListView3, $i - 1, False)
    Next

    $count = _GUICtrlListView_GetItemCount($ListView4)
    For $i = 1 To $count Step 1
        _GUICtrlListView_SetItemChecked($ListView4, $i - 1, False)
    Next

    $count = _GUICtrlListView_GetItemCount($ListView5)
    For $i = 1 To $count Step 1
        _GUICtrlListView_SetItemChecked($ListView5, $i - 1, False)
    Next

    $count = _GUICtrlListView_GetItemCount($ListView6)
    For $i = 1 To $count Step 1
        _GUICtrlListView_SetItemChecked($ListView6, $i - 1, False)
    Next
EndFunc   ;==>_UnselectAll

Func _HelpTopics()
    $Form2 = GUICreate("Help Topics", 633, 447)
    $Label1 = GUICtrlCreateLabel("", 8, 16, 612, 425)
    GUICtrlSetData(-1, "This program uses silent switches to install software without user interaction. To use this functionality, you can edit the Config.ini file to add software and their switches. Example: " & @CRLF & @CRLF & "[7zip.exe]" & @CRLF & "Switch=/S" & @CRLF & "Desc=A zip file utility" & @CRLF & "Category=5" & @CRLF & @CRLF & "The name of the file is the first line in the brackets. The line with Switch= is the section for the unattended switch. The Desc= is the description for the program. The Category= is the tab you want the program to show up on the interface." & @CRLF & @CRLF & "Here are some common switches for various installers:" & @CRLF & @CRLF & "/silent used for Inno Setup installers" & @CRLF & "/verysilent used for Inno Setup installers" & @CRLF & "/S used for Nullsoft (aka NSIS) installers" & @CRLF & "/s used for Wise installers" & @CRLF & "-s used for Ghost installers" & @CRLF & "-ms used for Mozilla installers" & @CRLF & "/quiet used for Microsoft installers" & @CRLF & "/qb used for Microsoft installers" & @CRLF & "/qn used for Microsoft installers" & @CRLF & "/passive used for Microsoft installers" & @CRLF & "/Q used for Microsoft installers" & @CRLF & @CRLF & "Note: Some installers are case sensitive (Ghost and Nullsoft for sure).")
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($Form2)
                ExitLoop
        EndSwitch
    WEnd
EndFunc   ;==>_HelpTopics

Func _AboutProject()
    $Form3 = GUICreate("About", 413, 196)
    $Label1a = GUICtrlCreateLabel("", 24, 64, 364, 113)
    $Label2a = GUICtrlCreateLabel("Software Installer 1.0", 24, 8, 375, 41)
    GUICtrlSetFont(-1, 24, 800, 2, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x000080)
    GUISetState(@SW_SHOW)
    $aboutData = "This program was written|in a programming language called Autoit||Brought to you by abberration"
    $sData = StringSplit($aboutData, "|", 2)
    $string = ""
    For $i = 1 To UBound($sData) Step 1
        $string = $string & @CRLF & $sData[$i - 1] & @CRLF
        GUICtrlSetData($Label1a, $string)
        Sleep(1000)
    Next

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($Form3)
                ExitLoop
        EndSwitch
    WEnd
EndFunc   ;==>_AboutProject

Config file for version 1.0:

Quote

[7zip.exe]
Switch=/S
Desc=A zip file utility
Category=5

[Adobe Reader.exe]
Desc=A free PDF viewer
switch=-ai
Category=6

[CCleaner.exe]
Switch=/S
Desc=Clean up junk on your computer
Category=2

[Adobe Flash (for IE).exe]
Switch=-install
Desc=View animated web content
Category=3

[Adobe Flash (non-IE).exe]
Switch=-install
Desc=View animated web content
Category=3

[Combined Community Codec Pack.exe]
Switch=/verysilent
Desc=Large collection of codecs
Category=1

[Defraggler.exe]
Switch=/S
Desc=Defrag your hard drive
Category=2

[Faststone Capture.exe]
Switch=/S
Desc=Screen capture program
Category=1

[GFI Backup.exe]
Switch=/silent
Desc=Scheduled backups of files & folders
Category=6

[KeePass.exe]
Switch=/verysilent
Desc=Password management program
Category=6

[Firefox.exe]
Switch=-ms
Desc=Fast, secure web browser
Category=3

[Office 2007 Compatibility Pack.exe]
Switch=/quiet
Desc=Open newer Office files with older versions
Category=6

[PhotoFiltre.exe]
Switch=/verysilent
Desc=Photo editing program
Category=1

[Sunbird.exe]
Switch=-ms
Desc=Calendar/management program
Category=6

[Thunderbird.exe]
Switch=-ms
Desc=Email client
Category=6

[System Information for Windows.exe]
Switch=/verysilent
Desc=Lists all information about your computer
Category=2

[TrueCrypt.exe]
Switch=/verysilent
Desc=A very strong encryption program
Category=5

[uTorrent.exe]
Switch=/PERFORMINSTALL 6
Desc=A lightweight torrent downloader
Category=3

[DVD Shrink.exe]
Switch=/verysilent
Desc=Rip & burn DVDs
Category=1

[Filezilla.exe]
Switch=/S
Desc=FTP client
Category=3

[Exact Audio Copy.exe]
Switch=/S
Desc=An accurate CD ripping program
Category=5

[RocketDock.exe]
Switch=/verysilent
Desc=Quick launcher similar to the Mac's
Category=5

[Open Office.exe]
Switch=/S
Desc=The free version of Microsoft's Office
Category=6

[File Shredder.exe]
Switch=/verysilent
Desc=Doesn't just delete files - it shreds them
Category=5

[VLC Media Player.exe]
Switch=/S
Desc=Media player that comes with own codecs
Category=1

[Free Audio Editor.exe]
Switch=/silent
Desc=Edit audio tracks
Category=1

[Rainlendar.exe]
Switch=/S
Desc=Slick desktop calendar & reminder
Category=6

[XPlorer.exe]
Switch=/S
Desc=Alternative to Windows' Explorer
Category=5

[Any Video Converter.exe]
Switch=/verysilent
Desc=Converts video to different formats
Category=1

[TheSage.exe]
Switch=/verysilent
Desc=Dictionary and Thesaurus
Category=6

[BurnAware.exe]
Switch=/verysilent
Desc=CD/DVD/Blu-ray Disc burning software
Category=5

[FolderSize.exe]
Switch=/verysilent
Desc=Graphically lists folders by size
Category=2

[TagScanner.exe]
Switch=/verysilent
Desc=Edit the hidden tags in your MP3s
Category=1

[Personal Video Database.exe]
Switch=/verysilent
Desc=Manage your movie collection
Category=1

[Radio Sure.exe]
Switch=/verysilent
Desc=Stream music from online stations
Category=1

[WeatherMate.msi]
Switch=/qn
Desc=Desktop weather station
Category=5

[Kompozer.exe]
Switch=/verysilent
Desc=HTML creator/editor
Category=6

[Free Download Manager.exe]
Switch=/verysilent
Desc=An efficient way to download files
Category=3

[Miranda IM.exe]
Switch=/S
Desc=Instant messenger works with others IMs
Category=3

[Phoner.exe]
Switch=/verysilent
Desc=Make VOIP calls for free
Category=3

[Essential PIM.exe]
Switch=/S
Desc=Personal information manager
Category=6

[CrystalDiskInfo.exe]
Switch=/verysilent
Desc=Hard drive information utility
Category=2

[eMule.exe]
Switch=/S
Desc=P2P files sharing client
Category=3

[VirtualBox.exe]
Switch=
Desc=Run different OSes in your computer
Category=5

[Daylight Savings Time Patch (XP).exe]
Switch=/quiet
Desc=Patches XP for the correct DST date
Category=5

[EASEUS Todo Backup.exe]
Switch=/SP- /verysilent /norestart
Desc=Back up your entire computer
Category=6

[EASEUS Partition Manager.exe]
Switch=/verysilent
Desc=Create, delete or resize partitions on your hard drive
Category=2

[Audacity.exe]
Switch=/verysilent
Desc=A sound editing program
Category=1

[Family Tree Pilot.exe]
Switch=/verysilent
Desc=Geneology software
Category=6

[FileZilla (client).exe]
Switch=/S
Desc=FTP client
Category=3

[Free ISO Creator.exe]
Switch=/sp- /verysilent
Desc=Easily create ISO images
Category=5

[Google Chrome.exe]
Switch=/S
Desc=A very fast internet browser
Category=3

[Jaangle.exe]
Switch=/S
Desc=Media organizer
Category=1

[MagicDisc.exe]
Switch=/S
Desc=Lets you mount image files as virtual drives
Category=5

[Opera.msi]
Switch=/qn
Desc=A good internet browser
Category=3

[RadioSure.exe]
Switch=/verysilent
Desc=Stream music from online stations
Category=1

[Speccy.exe]
Switch=/S
Desc=Lists all information about your computer
Category=2

[WeatherMate.msi]
Switch=/qn
Desc=Desktop weather station
Category=5

[XMedia Recode.exe]
Switch=/S
Desc=Re-encode music and video
Category=1

[StreamTransport.exe]
Switch=/verysilent
Desc=Best SWF & Flash downloader of all
Category=3

[Adolix Split And Merge PDF.exe]
Switch=/verysilent
Desc=Very simple way to split or merge PDFs
Category=

[Dia.exe]
Switch=/S
Desc=Draw structured diagrams such as flow charts
Category=6

[Everything.exe]
Switch=/verysilent
Desc=Super fast file searching utility
Category=2

[EULAlyzer.exe]
Switch=/verysilent
Desc=Quickly scan EULAs for distessing statements
Category=6

[Glary Utilities.exe]
Switch=/verysilent
Desc=Fix errors, speed up and secure your computer
Category=2

[Malwarebytes Antimalware.exe]
Switch=/verysilent
Desc=Get rid of adware, spyware & trojans
Category=5

[Pencil.exe]
Switch=/verysilent
Desc=Makes freehand drawing easy to do
Category=6

[Avast Antivirus.exe]
Switch=/VERYSILENT /NORESTART /SP-
Desc=Powerful free antivirus
Category=5

[streamWriter.exe]
Switch=/verysilent
Desc=Save online radio streams to your computer
Category=6

[PhotoScape.exe]
Switch=/S
Desc=A fun and easy photo editing software
Category=1

 

 

Edited by abberration
Updated version (edited to correct an error and explain things better)

RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post


Link to post
Share on other sites

is it possible to place the *.exe in the folders? for example, some programs require different files that can be reproduced (eg some files *. ini)?

That could be done so that every program was in a separate file in the software?

eg

AdobeReader -> Software1

FineReader -> Software2

etc.?

Share this post


Link to post
Share on other sites

nice job, but can you add an detection of 32 or 64bit windows and

automatically only show the fitting version of the software?

Share this post


Link to post
Share on other sites

From playing with it i came up with this for 64/32 bit

I added an extra line to the .ini file for each product like this

[install_adobe.exe]

Desc=Adobe Reader X

switch= /sPB /rs /rps

Category=1

Arch=3264

Arch =

either

32 (32 bit installers)

or

64 (64 bit installers)

or

3264 (32 &64 bit installers in one file)

And changed the function populate like this, which appears to work

Func _Populate()
$OsArch = @OSArch
; Find all files in the Software folder and populate the tabs with the installers.
$f = FileFindFirstFile("Software/*.*")
Dim $array[1]
$i = 0
Do
$s = FileFindNextFile($f)
If Not @error Then
$array[$i] = $s
$i += 1
ReDim $array[$i + 1]
EndIf
Until @error
ReDim $array[$i]

Select
Case $OsArch = "X64"
For $i = 1 To UBound($array) Step 1
$category = IniRead($iniFile, $array[$i - 1], "Category", "6")
$desc = IniRead($iniFile, $array[$i - 1], "Desc", "")
$IniArch = IniRead($iniFile, $array[$i - 1], "Arch", "")
If $category = 1 And $IniArch > 32 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView1)
ElseIf $category = 2 And $IniArch > 32 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView2)
ElseIf $category = 3 And $IniArch > 32 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView3)
ElseIf $category = 4 And $IniArch > 32 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView4)
ElseIf $category = 5 And $IniArch > 32 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView5)
ElseIf $category = 6 And $IniArch > 32 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView6)
Else
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView7)
EndIf
Next
Case $OsArch = "X86"
For $i = 1 To UBound($array) Step 1
$category = IniRead($iniFile, $array[$i - 1], "Category", "6")
$desc = IniRead($iniFile, $array[$i - 1], "Desc", "")
$IniArch = IniRead($iniFile, $array[$i - 1], "Arch", "")
If $category = 1 And $IniArch <> 64 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView1)
ElseIf $category = 2 And $IniArch <> 64 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView2)
ElseIf $category = 3 And $IniArch <> 64 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView3)
ElseIf $category = 4 And $IniArch <> 64 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView4)
ElseIf $category = 5 And $IniArch <> 64 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView5)
ElseIf $category = 6 And $IniArch <> 64 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView6)
Else
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView7)
EndIf
Next
EndSelect
EndFunc ;==>_Populate

The only downside with this method is you have to add the Arch for each product.

But im sure there are many other ways

Edited by Chimaera

Share this post


Link to post
Share on other sites

I get an Error:

...installer.au3 (108) : ==> Variable used without being declared.:

GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView7)

GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, ^ ERROR

when trying to execute/compile your script

Share this post


Link to post
Share on other sites

thanks for shering.

little fix.

if the software folder is empty your code crash with this error:

Software Installer.au3 (86) : ==> Array variable subscript badly formatted.:

ReDim $array[$i]

ReDim $array[^ ERROR

to fix that add this line before line 86:

if $i = 0 Then Return 0

thanks again

Share this post


Link to post
Share on other sites

Is it possible to use this for some installation without silent switch?

Yes just omit the switch in the ini file

[install_adobe.exe]
Desc=Adobe Reader X
switch= /sPB /rs /rps ;==> becomes switch=
Category=1

it will still check but there is nothing to add

Edited by Chimaera

Share this post


Link to post
Share on other sites

Hi, i was wondering two things:

1) is it possible to check for software in multiple location?

2) is it possible to check for software published to a ftp path?

BTW: This is an awesome script :)

Edited by Copyrigth

Share this post


Link to post
Share on other sites

I cannot get it to read the config.ini?

any help greatly appreciated..

I hadd the same problem, but when i added "." before the path it worked. (for me, atleast)

Share this post


Link to post
Share on other sites

Maybe I'am to stupid or there is a wrong default on my pc.

There are many missing backslashes or am I wrong?

Global $iniFile = @ScriptDir & "Config.ini"

Run("msiexec /i " & '"' & $scriptDir & "Software" & $fileName & '" ' & $switch)

RunWait('"' & $scriptDir & "Software" & $fileName & '"' & " " & $switch)

Share this post


Link to post
Share on other sites

It's more than likely the forum software ate the backslashes when the script was posted or edited. Unfortunately it's a too common experience, so you'll have to reinsert them where they belong.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Please i do all of this work but it is not working.please someone attach a zip file with full workable script.please please please

Share this post


Link to post
Share on other sites

habib64,

First, welcome to the AutoIt forum. :)

I suggest you post your code - and the associated ini file - so that we can see where you might have gone wrong. When you post your script please use Code tags - put [autoit] before and [/autoit] after your posted code. Then you get a scrolling box and syntax colouring which makes it easier to read. :)

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

 

Share this post


Link to post
Share on other sites

Run("msiexec /i " & '"' & $scriptDir & "Software" & $fileName & '" ' & $switch) ; For MSI type installers

RunWait('"' & $scriptDir & "Software" & $fileName & '"' & " " & $switch) ; For EXE installers

These 2 lines don't seem to work as written, when executed a box just flashes real fast and nothing happens.

Can anybody see whats wrong with this, stumped.

Share this post


Link to post
Share on other sites

SWB,

There is nothing wrog there if your files is in a katalog kalled "Software" in the same katalog you run the script from.

If that is the case try posting the hole function :)

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By WilliamasKumeliukas
      Hi,
      I started this project alone in May 2020 as project in my spare time at work, I'm working for a IT company that started opening their services to residential customers few months ago and now my position in the company kinda drifted in the doom and gloom world of repetitive tasks like: Reinstallation of Windows 10.
      The procedure is very repetitive and I started feeling like being a robot which is the main reason I started this project.
       
      ==============================FAQ==================================
      1. Q: Do you want this project to be accomplished with the usage of AutoIT ONLY or 3rd party tools / Scripts (BATCH / POWERSHELL / VB) ? A: No, if I cannot find a way using AutoIT to accomplish a task I will move to my Plan B which consist of automating an 3rd party tool to accomplish the affected task until a solution is found. 2. Q: What do I get from helping/collaborating in this project? A: I will personally take the responsability to mention you in the credits of this project. 3. Q: If I have more questions, can I ask? A: Certainly! feel free to ask any questions related to this project! 4. Q: What is the main goal of this project? A: Automating Windows 10 configuration without user interaction needed (as much as possible) ______________________________________________________________________________________________________________________________
      Current progression of the project (more will be added in future)
      « Blue = Info || Yellow = Unfinished/Untested || Purple = Could be better || Green = Done ||Red = Not Yet Started »
      ***Very early Stage ***
      Connect Network Attached Storage(NAS) (Tested & Working - AutoIT only)
      Download & Install up to 567 softwares with Auto prediction of text typed  (Tested & Working - using 3rd party tool)
      Change OEM Information (Tested & Working - contains both AutoIT version and CMD script)
      Disable ScreenSaver (Require testing AutoIT only)
      Change Computer Name (Require testing AutoIT only) 
      Show Computer Information and Smart status on GUI (Work - AutoIT Only)
      Change .pdf / .pdfxml from Edge to Adobe Reader DC (Work - using 3rd party tool)
      Change Edge to Google Chrome as Default Browser (Tested & Working - using 3rd party tool)
      Windows Updates (Working - AutoIT only)
      Install Office 
      Verify and Update softwares installed (Can be added if wanted (up to 567 softwares) - 3rd party tool)
      Activate Office (Tested on 2010 & Working - CMD Script)
      Pin to taskbar Excel, Outlook, Word, Chrome (Tested & Working - using 3rd party tool)
      GUI currently featuring the following options :
      - Checkboxes for desired tasks
      Inputs for : SupportUrl, Manufacturer, Model, SupportPhone, SupportHour, OEM Logo path
      -  Redirect ConsoleWrite with timestamped messages in richedit (errors shown separately in red text)
                 *** To Do ***
       - Read informations needed for tasks like: OEM, ComputerName, NAS user/password etc... from a file
       - ListView for Windows Updates
       - Probably more
       
      ***  If this project interest you, Reply here This will greatly help me to see if you'd like this project to become real  ***
      ______________________________________________________________________________________________________________________________
      2020.09.21 Update: Since this topic reached over 200+ views without a single interest shown by community, pm me if you're willing to be part of the project and i'll share with you the GitHub project link  
      Best Regards,
      ~WilliamasKumeliukas
    • By WindIt
      Hi, 
      I have a set of excel docs 1& 2
      1) In Excel 1 i have a fixed column called dimensionId that contains list of dimensionid's with in between empty cells.
      Here, For each dimesionId, i need to check corresponding columns of L,M,N ,O(senior, mid, junior, student) & check If they contain letter Y (Open excel 2) and if empty ignore,check next.
      I need to loop through the entire column of dimensionId one by one, please help me proceed with the logic.
      2) If letter Y exists, open excel 2 and check if same dimesionId exists in column A.
      New to autoit excel automation, Help me with logic to execute this.
      #include <Excel.au3>
      Global $oExcel = _Excel_Open()
      Global $oWorkbook = _Excel_BookOpen($oExcel, "D:\yta\Trial concept dimensions list.xlsx")
      Local $read1 = _Excel_RangeRead ($oWorkbook,Default,"C3")
      MsgBox(0,"",$read1)
      Attached exce 1 doc.
       
       
      exl1.xlsx exl2.xlsx
    • By Earthshine
      This is pretty useful to me at least, I hope to others. Whenever you need to poke a button or such on a GUI, you can just make calls to this UDF and instruct it how long to wait, 0 is forever, anyway, let the code to the explaining. Feel free to help expand this UDF. I plan to create new ones as I go along that support all the Win32 and .NET Controls. Ultimately, I would like to be able to fully control any type of control, this works well with most. Just an example of what you can do.
      NOTE: Logger Author(s) .....: Michael Mims (zorphnog)
      ;                    the logging script can be obtained here
      ;                   https://www.autoitscript.com/forum/topic/156196-log4a-a-logging-udf/
       
       
       
       
       
       
       
      WaitForControls.au3 log4a.au3
    • By NassauSky
      Hi All,
      I think I'm so close to solving an automation problem but need that last bit of help. Anyone familiar with automation might know this answer.  The beginning of this code is a nice example from @IanN1990 which I dug into a little and found it's counting my tabs correctly in Chrome.  How may I print out each tab name (probably some sort of property in the automation object)
      #include "CUIAutomation2.au3" ; Window handle Local $hWindow = WinGetHandle( "[CLASS:Chrome_WidgetWin_1]" ) If Not IsHWnd( $hWindow ) Then Return ConsoleWrite( "$hWindow ERR" & @CRLF ) ConsoleWrite( "$hWindow OK" & @CRLF ) ; Activate window WinActivate( $hWindow ) Sleep( 100 ) ; UI Automation object Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement( $pDesktop ) $oDesktop = ObjCreateInterface( $pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oDesktop ) Then Return ConsoleWrite( "$oDesktop ERR" & @CRLF ) ConsoleWrite( "$oDesktop OK" & @CRLF ) ; Chrome window Local $pCondition $oUIAutomation.CreatePropertyCondition( $UIA_ClassNamePropertyId, "Chrome_WidgetWin_1", $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) Local $pChrome, $oChrome $oDesktop.FindFirst( $TreeScope_Descendants, $pCondition, $pChrome ) $oChrome = ObjCreateInterface( $pChrome, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oChrome ) Then Return ConsoleWrite( "$oChrome ERR" & @CRLF ) ConsoleWrite( "$oChrome OK" & @CRLF ) ; Tab item Local $pCondition1 $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_TabItemControlTypeId, $pCondition1 ) If Not $pCondition1 Then Return ConsoleWrite( "$pCondition1 ERR" & @CRLF ) ConsoleWrite( "$pCondition1 OK" & @CRLF ) ;~ Find All tab items Local $pTabs, $oUIElementArray, $iElements, $pFound, $oFound, $value $oChrome.FindAll( $TreeScope_Descendants, $pCondition1, $pTabs ) $oUIElementArray = ObjCreateInterface($pTabs, $sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray) $oUIElementArray.Length( $iElements ) ConsoleWrite( "$iElements:" & $iElements & @CRLF ) For $i = 0 To $iElements - 1 Local $pFound $oUIElementArray.GetElement($i, $pFound) ConsoleWrite($pFound & @CRLF) $pFound.GetCurrentPropertyValue($UIA_NamePropertyId,$value) ;<==PROBLEM HERE ConsoleWrite($value & @CRLF) Next  
      Thanks for any direction.
      🙂
×
×
  • Create New...