• Offizieller Beitrag

    Hallo,

    Folgende Idee:
    Ein Skript, dass beliebige Programme automatisch installiert. Das klingt jetzt erst mal komisch und unmöglich, aber ich beschreibe mal, wie ich mir das vorstelle.
    Parameter fallen leider weg, weil zu viele Programme (bezogen auf das "beliebige" von oben) keine, Eigenbau- oder nicht funktionierende Parameter haben. Dazu kommt sehr schlimm, dass sich damit praktisch nie die Yahoo!- und Google-Toolbars und ähnlicher Müll abwählen lassen.

    So, also folgendes Vorgehen:
    Jedes Fenster abscannen und die Art und Texte der Controls speichern.
    Dann ein Regelset aus einer Datei laden, das z.B. so aussehen könnte:


    Diese Liste von Aktionen könnte man von oben nach unten durchgehen und ausführen, falls eine passt. Neue Fenster lassen sich über die WinList finden.
    Meint ihr, das wäre so umsetzbar? Ich denke, dass es relativ viel Software erwischen könnte, mindestens die großen 3-4 Installertypen. Aber es hätte mit den richtigen Aktionslisten eben auch das Potential für mehr :)...

    Vielleicht hat ja jemand Lust,
    peethebee

  • Hi,
    ich glaube das ist viel Komplexer, als man das denkt.
    Eben hatte ich Langeweile und hab mal "angefangen". Man wählt eine Datei aus und dann wartet mein Programm erkennt bis ein Fenster Hinzugekommen ist.Aber da fängt das Problem schon an.
    Währenddessen dürfen keine Fenster aufgehen, sonst funktioniert gar nichts mehr. Dann hab ich versucht einen Install-Shield Wizzard aufzurufen.
    Da kommt zuerst ein Ladebalken und ein Popup-Fenster. Da ist mein Programm das erste mal hängen geblieben, weil es auf 1 erscheinendes Fenster ausgelegt ist. Dann muss es warten bis InstallShield so weit ist.
    Dann kann man erst auf weiter drücken.

    Also das ist echt viel arbeit und es wird am Schluss immer noch 20 verschiedene Installer geben, bei denen es nicht Funktioniert. Wenn mir wieder langweilig ist kann ich ja mal versuchen ein bisschen weiter zu machen, aber es gibt 1000 Möglichkeiten auf die das Programm reagieren müsste.

  • Also hier mal ein Ansatz:

    Dieses Testscript ermittelt alle Window-Infos der gestarteten EXE, sowie die Daten aller Child-Prozesse (Adobe Reader Setup startet nach ein paar Sekunden z.b. msiexec.exe)
    Also sollten alle Fenster, die während der Installation aufpoppen und zur Installation gehören ermittelt werden.

    Diese Script ist nur mal zum Testen; man muß sich manuell durch die Installation klicken und die Infos werden im Tooltip angezeigt...

    Die _WinGetInfoByPID hab ich aus einem Script von GtaSpider
    (leicht verändert, da versteckte Fenster nicht gefunden werden sollen)
    _ProcessGetChildren ist aus dem englischen Forum.

    nur probehalber mit 7zip und Adobe Reader von IOM4 getestet...

    Spoiler anzeigen
    [autoit]

    HotKeySet("^!e","_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    Global $Infos=""
    Global Const $WM_USER = 0x400
    Global Const $TTM_SETTIPBKCOLOR = ($WM_USER + 19)
    Global Const $TTM_SETTIPTEXTCOLOR = ($WM_USER + 20)

    [/autoit] [autoit][/autoit] [autoit]

    $hFile=FileOpenDialog("Installations-Exe",@ScriptDir & "\Installationen","(*.exe;*.msi)",3)
    If @error Then Exit
    If StringRight($hFile,4)=".exe" Then $sPID=Run($hFile)
    If StringRight($hFile,4)=".msi" Then
    If ShellExecute($hFile)=1 Then
    $Child=_ProcessGetChildren(@AutoItPID)
    If @error Then Exit
    $sPID=$Child[1][0]
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Do
    Sleep(500)
    $Infos=""
    _GetInfo($sPID)
    _ToolTip($Infos)
    Until ProcessExists($sPID)=0

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetInfo($sPid)
    $Child=_ProcessGetChildren($sPID)
    If IsArray($Child) Then
    For $i= 1 To UBound($Child)-1
    $aWin=_WinGetInfoByPID($Child[$i][0])
    If Not @error Then
    _AddInfos($aWin)
    _GetInfo($Child[$i][0])
    EndIf
    Next
    Else
    $aWin=_WinGetInfoByPID($sPID)
    If Not @error Then _AddInfos($aWin)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _AddInfos($Array)
    Local $String=""
    For $i=1 To UBound($Array,1)-1
    For $j=1 To UBound($Array,2)-1
    $String&=$Array[$i][$j]
    Next
    $String&=@CRLF & "------------" & @CRLF
    Next
    $Infos&=$String
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _WinGetInfoByPID($sPID)
    Local $aPList = ProcessList(), $iPID
    For $iiCount = 1 To $aPList[0][0]
    If $aPList[$iiCount][1] = $sPID Then
    If $sPID = 0 Then Return 0
    $iPID &= $aPList[$iiCount][1] & Chr(01)
    EndIf
    Next
    $iPID = StringSplit($iPID, Chr(01))
    If $iPID = 0 Then Return SetError(1, 0, 0)
    Local $aStoreHwndAndText[2][9], $nCount = 1
    $OptWSC = Opt('WinSearchChildren', 0)
    $OptWDHT = Opt('WinDetectHiddenText', 0)
    Local $aWinList = WinList()
    For $iCount = 1 To $aWinList[0][0]
    For $xCount = 1 To $iPID[0]
    If WinGetProcess($aWinList[$iCount][1]) = $iPID[$xCount] And _
    $aWinList[$iCount][0] <> '' Then
    Local $aWinPos = WinGetPos($aWinList[$iCount][1])
    Local $aWinClient = WinGetClientSize($aWinList[$iCount][1])
    $nCount += 1
    ReDim $aStoreHwndAndText[$nCount][9]
    $aStoreHwndAndText[$nCount - 1][1] = $aWinList[$iCount][0]
    $aStoreHwndAndText[$nCount - 1][2] = $aWinList[$iCount][1]
    $aStoreHwndAndText[$nCount - 1][3] = WinGetText($aWinList[$iCount][1])
    $aStoreHwndAndText[$nCount - 1][4] = $aWinPos[0]
    $aStoreHwndAndText[$nCount - 1][5] = $aWinPos[1]
    $aStoreHwndAndText[$nCount - 1][6] = $aWinClient[0]
    $aStoreHwndAndText[$nCount - 1][7] = $aWinClient[1]
    $aStoreHwndAndText[$nCount - 1][8] = WinGetClassList($aWinList[$iCount][1])
    EndIf
    Next
    Next
    Opt('WinSearchChildren', $OptWSC)
    Opt('WinDetectHiddenText', $OptWDHT)
    If $nCount = 1 Then Return SetError(2, 0, 0)
    Return $aStoreHwndAndText
    EndFunc ;==>_WinGetInfoByPID

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _ProcessGetChildren($i_pid) ; First level children processes only
    Local Const $TH32CS_SNAPPROCESS = 0x00000002

    Local $a_tool_help = DllCall("Kernel32.dll", "long", "CreateToolhelp32Snapshot", "int", $TH32CS_SNAPPROCESS, "int", 0)
    If IsArray($a_tool_help) = 0 Or $a_tool_help[0] = -1 Then Return SetError(1, 0, $i_pid)

    Local $tagPROCESSENTRY32 = _
    DllStructCreate _
    ( _
    "dword dwsize;" & _
    "dword cntUsage;" & _
    "dword th32ProcessID;" & _
    "uint th32DefaultHeapID;" & _
    "dword th32ModuleID;" & _
    "dword cntThreads;" & _
    "dword th32ParentProcessID;" & _
    "long pcPriClassBase;" & _
    "dword dwFlags;" & _
    "char szExeFile[260]" _
    )
    DllStructSetData($tagPROCESSENTRY32, 1, DllStructGetSize($tagPROCESSENTRY32))

    Local $p_PROCESSENTRY32 = DllStructGetPtr($tagPROCESSENTRY32)

    Local $a_pfirst = DllCall("Kernel32.dll", "int", "Process32First", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pfirst) = 0 Then Return SetError(2, 0, $i_pid)

    Local $a_pnext, $a_children[11][2] = [[10]], $i_child_pid, $i_parent_pid, $i_add = 0
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    $i_add += 1
    $a_children[$i_add][0] = $i_child_pid
    $a_children[$i_add][1] = DllStructGetData($tagPROCESSENTRY32, "szExeFile")
    EndIf
    EndIf

    While 1
    $a_pnext = DLLCall("Kernel32.dll", "int", "Process32Next", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pnext) And $a_pnext[0] = 0 Then ExitLoop
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    If $i_add = $a_children[0][0] Then
    ReDim $a_children[$a_children[0][0] + 11][2]
    $a_children[0][0] = $a_children[0][0] + 10
    EndIf
    $i_add += 1
    $a_children[$i_add][0] = $i_child_pid
    $a_children[$i_add][1] = DllStructGetData($tagPROCESSENTRY32, "szExeFile")
    EndIf
    EndIf
    WEnd

    If $i_add <> 0 Then
    ReDim $a_children[$i_add + 1][2]
    $a_children[0][0] = $i_add
    EndIf

    DllCall("Kernel32.dll", "int", "CloseHandle", "long", $a_tool_help[0])
    If $i_add Then Return $a_children
    Return SetError(3, 0, 0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _ToolTip($sText)
    ToolTip($sText,0,0)
    Local $h_tooltip = WinGetHandle ($sText)
    DllCall("user32.dll","int","SendMessage","hwnd",$h_tooltip,"int",$TTM_SETTIPBKCOLOR,"int",0xcd0000,"int",0)
    DllCall("user32.dll","int","SendMessage","hwnd",$h_tooltip,"int",$TTM_SETTIPTEXTCOLOR,"int",0xFFFFFF,"int",0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    ach ja, beim Tooltip hab ich die Schriftgröße verändert, damit mehr Zeilen reinpassen ;)

    lgE

    //Edit: Hab noch den HotKey Ctrl-Alt-e zum Beenden eingefügt, da bei der Thunderbirdinstallation der Tooltip den gesammten Bildschirm ausfüllt
    und man dann nicht mal in den Taskmanager reinkommt :rolleyes:

    • Offizieller Beitrag

    Das ist doch schon mal ein Ansatz :). Sehr gut!
    Um das Problem von anno zu lösen könnte man ja alle 2-3 Sekunden die Regelliste abarbeiten. Man müsste nur verhindern, dass die letzte Regel ("Enter") nicht einen "Abrrechen"-Button auslöst z.B. während des Kopierens von Dateien.

    peethebee

  • *.msi lassen sich nur mit Shellexecute starten...
    da brauchen wir noch eine Lösung, um an die richtige PID der msiexec.exe zu kommen...

    //Edit: gelöst, Siehe oben: PID von msi wird als Child von Autoit ermittelt :D

    Welche Dateien kann man noch installieren? *.inf?

    lgE

  • Hab mal versucht obiges Script so zu erweitern, daß nur alle relevanten Controls angezeigt werden:

    Spoiler anzeigen
    [autoit]

    #include<Array.au3>
    ;#include<ArrayMore.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("TrayIconDebug",1)

    [/autoit] [autoit][/autoit] [autoit]

    HotKeySet("^!e","_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    Global $Infos="", $Controls

    [/autoit] [autoit][/autoit] [autoit]

    $hFile=FileOpenDialog("Installations-Exe",@ScriptDir & "\Installationen","(*.exe;*.msi)",3)
    If @error Then Exit
    If StringRight($hFile,4)=".exe" Then $sPID=Run($hFile)
    If StringRight($hFile,4)=".msi" Then
    If ShellExecute($hFile)=1 Then
    $Child=_ProcessGetChildren(@AutoItPID)
    If @error Then Exit
    $sPID=$Child[1][0]
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Do
    Sleep(500)
    $Infos=""
    $Controls=""
    _GetInfo($sPID)
    ;_ToolTip($Infos)
    ToolTip($Controls,0,0)
    Until ProcessExists($sPID)=0

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetInfo($sPid)
    $Child=_ProcessGetChildren($sPID)
    If IsArray($Child) Then
    For $i= 1 To UBound($Child)-1
    $aWin=_WinGetInfoByPID($Child[$i][0])
    If Not @error Then
    _AddInfos($aWin)
    _GetInfo($Child[$i][0])
    EndIf
    Next
    Else
    $aWin=_WinGetInfoByPID($sPID)
    If Not @error Then _AddInfos($aWin)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _AddInfos($Array)
    Local $String=""
    For $i=1 To UBound($Array,1)-1
    For $j=1 To UBound($Array,2)-1
    If $j=2 Then _AddControls(_listcontrols($Array[$i][2]))
    $String&=$Array[$i][$j]
    Next
    $String&=@CRLF & "------------" & @CRLF
    Next
    $Infos&=$String
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _AddControls($Array)
    Local $String="", $Temp
    For $i=1 To UBound($Array,1)-1
    If StringInStr($Array[$i][0],"Button") Or StringInStr($Array[$i][0],"Edit") Or StringInStr($Array[$i][0],"Combobox") Or StringInStr($Array[$i][0],"Checkbox") Then
    $Temp=$Array[$i][3] & "_" & $Array[$i][0] & ": " & $Array[$i][1]
    If StringLen($Temp)>100 Then $Temp=StringLeft($Temp,100)
    If StringInStr($Controls,$Temp)=0 Then
    $String=@CRLF&WinGetTitle($Array[1][2])&@CRLF&"--------------------------------------------"&@CRLF
    ExitLoop
    EndIf
    EndIf
    Next
    For $i=1 To UBound($Array,1)-1
    If StringInStr($Array[$i][0],"Button") Or StringInStr($Array[$i][0],"Edit") Or StringInStr($Array[$i][0],"Combobox") Or StringInStr($Array[$i][0],"Checkbox") Then
    $Temp=$Array[$i][3] & "_" & $Array[$i][0] & ": " & $Array[$i][1]
    If StringLen($Temp)>100 Then $Temp=StringLeft($Temp,100)
    If StringInStr($Controls,$Temp)=0 Then $String&=$Temp & @CRLF
    EndIf
    Next
    If $String<>"" Then $Controls&=$String&"--------------------------------------------"&@CRLF
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _WinGetInfoByPID($sPID)
    Local $aPList = ProcessList(), $iPID
    For $iiCount = 1 To $aPList[0][0]
    If $aPList[$iiCount][1] = $sPID Then
    If $sPID = 0 Then Return 0
    $iPID &= $aPList[$iiCount][1] & Chr(01)
    EndIf
    Next
    $iPID = StringSplit($iPID, Chr(01))
    If $iPID = 0 Then Return SetError(1, 0, 0)
    Local $aStoreHwndAndText[2][9], $nCount = 1
    $OptWSC = Opt('WinSearchChildren', 0)
    $OptWDHT = Opt('WinDetectHiddenText', 0)
    Local $aWinList = WinList()
    For $iCount = 1 To $aWinList[0][0]
    For $xCount = 1 To $iPID[0]
    If WinGetProcess($aWinList[$iCount][1]) = $iPID[$xCount] And _
    $aWinList[$iCount][0] <> '' Then
    Local $aWinPos = WinGetPos($aWinList[$iCount][1])
    Local $aWinClient = WinGetClientSize($aWinList[$iCount][1])
    $nCount += 1
    ReDim $aStoreHwndAndText[$nCount][9]
    $aStoreHwndAndText[$nCount - 1][1] = $aWinList[$iCount][0]
    $aStoreHwndAndText[$nCount - 1][2] = $aWinList[$iCount][1]
    $aStoreHwndAndText[$nCount - 1][3] = WinGetText($aWinList[$iCount][1])
    $aStoreHwndAndText[$nCount - 1][4] = $aWinPos[0]
    $aStoreHwndAndText[$nCount - 1][5] = $aWinPos[1]
    $aStoreHwndAndText[$nCount - 1][6] = $aWinClient[0]
    $aStoreHwndAndText[$nCount - 1][7] = $aWinClient[1]
    $aStoreHwndAndText[$nCount - 1][8] = WinGetClassList($aWinList[$iCount][1])
    EndIf
    Next
    Next
    Opt('WinSearchChildren', $OptWSC)
    Opt('WinDetectHiddenText', $OptWDHT)
    If $nCount = 1 Then Return SetError(2, 0, 0)
    Return $aStoreHwndAndText
    EndFunc ;==>_WinGetInfoByPID

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _ProcessGetChildren($i_pid) ; First level children processes only
    Local Const $TH32CS_SNAPPROCESS = 0x00000002

    Local $a_tool_help = DllCall("Kernel32.dll", "long", "CreateToolhelp32Snapshot", "int", $TH32CS_SNAPPROCESS, "int", 0)
    If IsArray($a_tool_help) = 0 Or $a_tool_help[0] = -1 Then Return SetError(1, 0, $i_pid)

    Local $tagPROCESSENTRY32 = _
    DllStructCreate _
    ( _
    "dword dwsize;" & _
    "dword cntUsage;" & _
    "dword th32ProcessID;" & _
    "uint th32DefaultHeapID;" & _
    "dword th32ModuleID;" & _
    "dword cntThreads;" & _
    "dword th32ParentProcessID;" & _
    "long pcPriClassBase;" & _
    "dword dwFlags;" & _
    "char szExeFile[260]" _
    )
    DllStructSetData($tagPROCESSENTRY32, 1, DllStructGetSize($tagPROCESSENTRY32))

    Local $p_PROCESSENTRY32 = DllStructGetPtr($tagPROCESSENTRY32)

    Local $a_pfirst = DllCall("Kernel32.dll", "int", "Process32First", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pfirst) = 0 Then Return SetError(2, 0, $i_pid)

    Local $a_pnext, $a_children[11][2] = [[10]], $i_child_pid, $i_parent_pid, $i_add = 0
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    $i_add += 1
    $a_children[$i_add][0] = $i_child_pid
    $a_children[$i_add][1] = DllStructGetData($tagPROCESSENTRY32, "szExeFile")
    EndIf
    EndIf

    While 1
    $a_pnext = DLLCall("Kernel32.dll", "int", "Process32Next", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pnext) And $a_pnext[0] = 0 Then ExitLoop
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    If $i_add = $a_children[0][0] Then
    ReDim $a_children[$a_children[0][0] + 11][2]
    $a_children[0][0] = $a_children[0][0] + 10
    EndIf
    $i_add += 1
    $a_children[$i_add][0] = $i_child_pid
    $a_children[$i_add][1] = DllStructGetData($tagPROCESSENTRY32, "szExeFile")
    EndIf
    EndIf
    WEnd

    If $i_add <> 0 Then
    ReDim $a_children[$i_add + 1][2]
    $a_children[0][0] = $i_add
    EndIf

    DllCall("Kernel32.dll", "int", "CloseHandle", "long", $a_tool_help[0])
    If $i_add Then Return $a_children
    Return SetError(3, 0, 0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _listcontrols($HWND)
    If Not WinExists($HWND) Then Return SetError(1,Default,0)
    $class = WinGetClassList($HWND)
    $class = StringSplit($class,@LF)
    If Not IsArray($class) Then Return SetError(2,Default,0)
    _Array2DDblDel($class)
    Local $ret[1][4]
    For $i = 1 To UBound($class)-1
    $count = 1
    While True
    If IsHWnd(ControlGetHandle($HWND,"",$class[$i]&$count)) Then
    If ControlCommand($HWND,"",$class[$i]&$count,"IsVisible", "") And ControlCommand($HWND,"",$class[$i]&$count,"IsEnabled", "") Then
    ReDim $ret[UBound($ret)+1][4]
    $ret[UBound($ret)-1][0]=$class[$i]&$count
    $ret[UBound($ret)-1][1]=ControlGetText($HWND,"",$class[$i]&$count)
    $ret[UBound($ret)-1][2]=$HWND
    If ControlCommand($HWND,"",$class[$i]&$count,"IsChecked", "")=1 Then
    $ret[UBound($ret)-1][3]="Checked"
    Else
    $ret[UBound($ret)-1][3]="-"
    EndIf
    EndIf
    Else
    ExitLoop
    EndIf
    $count = $count +1
    WEnd
    Next
    $ret[0][0] = UBound($ret) -1
    ;_ArrayDisplay($ret)
    Return $ret
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Array2DDblDel(ByRef $ARRAY, $CASESENS=0)
    Local $arTmp[1] = [''], $dbl = 0, $count = 0, $x, $l, $val, $valTmp, $i, $k
    If ( Not IsArray($ARRAY) ) Then
    SetError(1)
    Return 0
    EndIf
    Local $Ubound2nd = UBound($ARRAY,2)
    If @error = 2 Then
    For $i = 0 To UBound($ARRAY)-1
    $dbl = 0
    For $k = 0 To UBound($arTmp)-1
    Switch $CASESENS
    Case 0
    If $arTmp[$k] = $ARRAY[$i] Then
    $dbl = 1
    $count += 1
    EndIf
    Case 1
    If $arTmp[$k] == $ARRAY[$i] Then
    $dbl = 1
    $count += 1
    EndIf
    EndSwitch
    Next
    If $dbl = 0 Then
    If $arTmp[0] = "" Then
    $arTmp[0] = $ARRAY[$i]
    Else
    ReDim $arTmp[UBound($arTmp)+1]
    $arTmp[UBound($arTmp)-1] = $ARRAY[$i]
    EndIf
    Else
    $dbl = 0
    EndIf
    Next
    Else
    ReDim $arTmp[1][$Ubound2nd]
    $arTmp[0][0] = ''
    $x = 0
    For $i = 0 To UBound($ARRAY)-1
    $dbl = 0
    $val = ''
    $valTmp = ''
    For $l = 0 To $Ubound2nd-1
    $val &= $ARRAY[$i][$l]
    Next
    For $k = 0 To UBound($arTmp)-1
    For $l = 0 To $Ubound2nd-1
    $valTmp &= $arTmp[$k][$l]
    Next
    Switch $CASESENS
    Case 0
    If $valTmp = $val Then
    $dbl = 1
    $count += 1
    EndIf
    Case 1
    If $valTmp == $val Then
    $dbl = 1
    $count += 1
    EndIf
    EndSwitch
    $valTmp = ''
    Next
    If $dbl = 0 Then
    If $x = 1 Then ReDim $arTmp[UBound($arTmp)+1][$Ubound2nd]
    For $l = 0 To $Ubound2nd-1
    If $arTmp[0][0] = '' Or $x = 0 Then
    $arTmp[0][$l] = $ARRAY[0][$l]
    If $l = $Ubound2nd-1 Then $x = 1
    Else
    $arTmp[UBound($arTmp)-1][$l] = $ARRAY[$i][$l]
    $x = 2
    If $l = $Ubound2nd-1 Then $x = 1
    EndIf
    Next
    Else
    $dbl = 0
    EndIf
    Next
    EndIf
    $ARRAY = $arTmp
    Return $count
    EndFunc ; ==>_ArrayDblDel

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Damit kann man mal überprüfen, welche Install-versionen damit noch nicht abgedeckt sind...
    zu Testzwecken solls mal reichen ;)

    lgE

  • Man man man, gute Arbeit :thumbup: .

    Ich hab meine Meinung dazu, dass es ohne reisengroßen Aufwand zu schaffen ist geändert :D .

    Ich hab dein Script mit einigen Installern getestet.
    Es funktioniert überall. Überall werden alle wichtigen Informationen angezeigt. Wo es natürlich nicht Funktioniert sind Installer die auf Flash Ebene laufen und bei denen es keine ID's und Controls gibt, aber da wäre eine Automatische Installation schon schwierig. Solche Installer gab es bei alten ICQ Versionen, aber heute werden solche Installer kaum noch genutzt.
    Ich habe 50 Installer getestet, und überall waren alle wichtigen Informationen drin, die man benötigt hätte. Was man jetzt noch machen könnte, man könnte den gegebenen Text auf bestimmte Schlüsselwörter durchsuchen.
    Wenn man warten soll, dann steht meistens im Text "Bitte warten", oder es steht da "drücken sie weiter". Wenn man dann jedesmal solche Schlüsselwörter sucht und man dann 50 Möglichkeiten zur Verfügung hat, dann kann man schon auf eine ganze Reihe von Events reagieren. Dazu kommt noch, dass man die Buttons kennt.

    Und ich hab ewig eine Möglichkeit gesucht die PID der EXE zu bekommen.
    Ich werde vielleicht ein bisschen rumbasteln wenn ich wieder daheim bin.

    Gute Arbeit, gefällt mir :).

  • Hallo

    bin sehr angetan von dem Script. Werde da auch mal ein paar sachen testen und die ergebnisse posten!
    gefällt mir sehr gut.

    MfG
    Psyche

  • Wie kann man folgendes Problem lösen?

    z.b.: Bei der Installation von Vista_XP_Virtual_Desktop_Manager kommt auf der 2 Seite eine Checkbox
    Diese trägt den Classname "Button1"

    Wie erkennt man nun, daß es sich um eine Checkbox handelt, und nicht um einen normalen Button?

    //Edit: Problem gelöst ;)

    Spoiler anzeigen
    [autoit]

    #include <WinAPI.au3>
    Global Const $GWL_STYLE = 0xFFFFFFF0
    $hWnd = ControlGetHandle("Vista/XP Virtual Desktops Setup", "", "Button1")
    $style = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE)
    If BitAND($style, 2) Then
    MsgBox(0, "", "CheckBox")
    ElseIf BitAND($style, 1) Then
    MsgBox(0, "", "Button")
    EndIf

    [/autoit]
  • Hab da jetzt lange nichts mehr gemacht, aber dennoch hier die letzte testversion:

    script starten, installationsdatei auswählen und starten, ein tooltip zeigt, was man (vielleicht mal das script selber) machen soll...
    keine angst - das script installiert noch nichts automatisch ;)

    viel spaß ;)

    Spoiler anzeigen
    [autoit]

    #include <WinAPI.au3>
    #include<Array.au3>
    #Include <GuiComboBox.au3>
    #include <GuiListView.au3>
    #Include <GuiListBox.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $sNext="Next|Weiter|Install|OK|Annehmen|Akzeptieren|Ja|Yes|Fertig|Agree|stimme"
    $sCompany="firm|compa"
    $sUser="benutzer|name|user"
    $sAccept="Accept|akzept|stimme|Lizenz|License"
    $sNotInstall="Google|Yahoo|eMusic|ebay"
    $sLanguage="english|german|deutsch"

    [/autoit] [autoit][/autoit] [autoit]

    Opt("TrayIconDebug",1)

    [/autoit] [autoit][/autoit] [autoit]

    HotKeySet("^!e","_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    Global $aInfos, $iKI_Cnt=0, $iKI_Prg=0, $bKI=False, $bKI_Chk=False

    [/autoit] [autoit][/autoit] [autoit]

    $hFile=FileOpenDialog("Installations-Exe",@ScriptDir & "\Installationen","(*.exe;*.msi)",3)
    If @error Then Exit
    If StringRight($hFile,4)=".exe" Then $sPID=Run($hFile)
    If StringRight($hFile,4)=".msi" Then
    If ShellExecute($hFile)=1 Then
    $Child=_ProcessGetChildren(@AutoItPID)
    If @error Then Exit
    $sPID=$Child[1][0]
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Do
    Sleep(500)
    $aInfos=_GetInfo($sPID)
    ;_ToolTip($aInfos)
    Sleep(500)
    _Install_KI($aInfos)
    Until ProcessExists($sPID)=0

    [/autoit] [autoit][/autoit] [autoit]

    Func _Install_KI($aInfos)
    Local $bProgress=False
    If IsArray($aInfos)=0 Then Return
    $iKI_Cnt+=1
    For $i=1 To $aInfos[0][0]
    If StringInStr($aInfos[$i][2],"progress") Then
    $bProgress=True
    If $aInfos[$i][3]=$iKI_Prg Then
    If $iKI_Cnt>10 Then $bKI=True
    Else
    $iKI_Cnt=0
    $bKI=False
    EndIf
    EndIf
    If $bKI=False Then ContinueLoop

    If (StringInStr($aInfos[$i][2],"Checkbox") Or StringInStr($aInfos[$i][1],"List") Or StringInStr($aInfos[$i][2],"Tree")) And $aInfos[$i][4]="Checked" And _StringInStr($aInfos[$i][5],$sNotInstall) Then
    ToolTip("Deselect: " & $aInfos[$i][5])
    If StringInStr($aInfos[$i][1],"ListBox") Then _GUICtrlListBox_DeleteString(ControlGetHandle($aInfos[$i][0],"",$aInfos[$i][1]), $aInfos[$i][2])
    $bKI=False
    EndIf

    If StringInStr($aInfos[$i][2],"Combo") And _StringInStr($aInfos[$i][5],$sLanguage)And _StringInStrFirst($aInfos[$i][5],$sLanguage)=False Then
    ToolTip("Wähle Sprache: Deutsch,German, oder English: " & $aInfos[$i][5])
    $bKI=False
    EndIf

    If StringInStr($aInfos[$i][2],"Edit") And $aInfos[$i][5]="" And _StringInStr($aInfos[$i][6],$sUser) Then
    ToolTip("Benutzernamen eingeben: " & $aInfos[$i][5])
    $bKI=False
    EndIf

    If StringInStr($aInfos[$i][2],"Edit") And $aInfos[$i][5]="" And _StringInStr($aInfos[$i][6],$sCompany) Then
    ToolTip("Firmennamen eingeben: " & $aInfos[$i][5])
    $bKI=False
    EndIf

    If StringInStr($aInfos[$i][2],"Checkbox") And $aInfos[$i][4]<>"Checked" And _StringInStr($aInfos[$i][5],$sAccept) Then
    ToolTip("Select: " & $aInfos[$i][5])
    $bKI=False
    EndIf

    If $bKI And $aInfos[$i][3]="Enabled" And StringInStr($aInfos[$i][2],"Button") And _StringinStr($aInfos[$i][5],$sNext) Then
    ToolTip("Klick auf: " & $aInfos[$i][5])
    $bKI_Chk=False
    ElseIf $bKI And $aInfos[$i][3]="Disabled" And StringInStr($aInfos[$i][2],"Button") And _StringinStr($aInfos[$i][5],$sNext) Then
    $bKI_Chk=True
    EndIf

    If $bKI And $bKI_Chk And StringInStr($aInfos[$i][2],"Checkbox") Then
    ToolTip("Klick auf: " & $aInfos[$i][5])
    $bKI_Chk=False
    EndIf

    Next
    If $bProgress=False Then $bKI=True
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _StringInStr($sStr1,$sStr2)
    Local $aStr2=StringSplit($sStr2,"|")
    If IsArray($aStr2) Then
    For $i=1 To $aStr2[0]
    If StringInStr($sStr1,$aStr2[$i]) Then Return True
    Next
    Else
    If StringInStr($sStr1,$sStr2) Then Return True
    EndIf
    Return False
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _StringInStrFirst($sStr1,$sStr2)
    Local $atmp=StringSplit($sStr1,"|")
    Local $aStr2=StringSplit($sStr2,"|")
    If IsArray($atmp)=True Then $sStr1=$atmp[1]
    If IsArray($aStr2)Then
    For $i=1 To $aStr2[0]
    If StringInStr($sStr1,$aStr2[$i]) Then Return True
    Next
    Else
    If StringInStr($sStr1,$sStr2) Then Return True
    EndIf
    Return False
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _ToolTip($aInfos)
    Local $sInfos=""
    If IsArray($aInfos) Then
    For $i=1 To $aInfos[0][0]
    For $j=0 To 6
    $sInfos&=StringFormat("%-20s",$aInfos[$i][$j])
    Next
    $sInfos&=@CRLF
    Next
    ToolTip($sInfos,0,0)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetInfo($sPid)
    Local $aRet
    $Child=_ProcessGetChildren($sPID)
    If IsArray($Child) Then
    For $i= 1 To UBound($Child)-1
    $aWin=_WinGetControls($Child[$i][0])
    _ArrayConcatenate($aRet,$aWin)
    $aRet=_GetInfo($Child[$i][0])
    Next
    Else
    $aRet=_WinGetControls($sPID)
    EndIf
    Return $aRet
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _WinGetControls($sPID)
    Local $aPList = ProcessList(), $iPID
    For $iiCount = 1 To $aPList[0][0]
    If $aPList[$iiCount][1] = $sPID Then
    If $sPID = 0 Then Return 0
    $iPID &= $aPList[$iiCount][1] & Chr(01)
    EndIf
    Next
    $iPID = StringSplit($iPID, Chr(01))
    If $iPID = 0 Then Return SetError(1, 0, 0)
    Local $aControlInfo[2][7], $nCount = 1
    $OptWSC = Opt('WinSearchChildren', 0)
    $OptWDHT = Opt('WinDetectHiddenText', 0)
    Local $aWinList = WinList()
    For $iCount = 1 To $aWinList[0][0]
    For $xCount = 1 To $iPID[0]
    If WinGetProcess($aWinList[$iCount][1]) = $iPID[$xCount] And $aWinList[$iCount][0] <> '' Then
    ;MsgBox(0,"",$aWinList[$iCount][0])
    If BitAND(WinGetState($aWinList[$iCount][1]),4)=0 Or BitAND(WinGetState($aWinList[$iCount][1]),2)=0 Then ExitLoop
    If BitAnd(_WinAPI_GetWindowLong($aWinList[$iCount][1],0xFFFFFFF0),0x08000000) Then ExitLoop
    $sClass = WinGetClassList($aWinList[$iCount][1])
    $Class=""
    If StringInStr($sClass,"Button") Then $Class&=_GetCtrlClass($sClass,"Button") & @LF
    If StringInStr($sClass,"Radio") Then $Class&=_GetCtrlClass($sClass,"Radio") & @LF
    If StringInStr($sClass,"ComboBox") Then $Class&=_GetCtrlClass($sClass,"ComboBox") & @LF
    If StringInStr($sClass,"Edit") Then $Class&=_GetCtrlClass($sClass,"Edit") & @LF
    If StringInStr($sClass,"CheckBox") Then $Class&=_GetCtrlClass($sClass,"CheckBox") & @LF
    If StringInStr($sClass,"Tree") Then $Class&=_GetCtrlClass($sClass,"Tree") & @LF
    If StringInStr($sClass,"List") Then $Class&=_GetCtrlClass($sClass,"List") & @LF
    If StringInStr($sClass,"Progress") Then $Class&=_GetCtrlClass($sClass,"Progress") & @LF
    $class = StringSplit($class,@LF)
    If Not IsArray($class) Then Return SetError(2,Default,0)
    For $zCount= 1 To $class[0]
    $Count = 1
    While True
    If IsHWnd(ControlGetHandle($aWinList[$iCount][1],"",$class[$zCount]&$count)) Then
    If ControlCommand($aWinList[$iCount][1],"",$class[$zCount]&$count,"IsVisible", "") Then
    If StringInStr($class[$zCount],"Tree") Then
    $Temp=_GetTreeViewItems($aWinList[$iCount][1],$class[$zCount]&$count)
    For $i=1 To $Temp[0]
    If ControlTreeView($aWinList[$iCount][1],"",$class[$zCount]&$count,"Exists",$Temp[$i])=0 Then ContinueLoop
    $nCount+=1
    ReDim $aControlInfo[$nCount][7]
    $aControlInfo[$nCount - 1][0] = $aWinList[$iCount][1]
    $aControlInfo[$nCount - 1][1] = $class[$zCount]&$count
    $aControlInfo[$nCount - 1][2] = $Temp[$i]
    $aControlInfo[$nCount - 1][3] = "";
    If ControlTreeView($aWinList[$iCount][1],"",$class[$zCount]&$count,"IsChecked",$Temp[$i]) Then
    $aControlInfo[$nCount - 1][4] = "Checked"
    Else
    $aControlInfo[$nCount - 1][4] = ""
    EndIf
    $aControlInfo[$nCount - 1][5] = ControlTreeView($aWinList[$iCount][1],"",$class[$zCount]&$count,"GetText",$Temp[$i])
    Next
    ElseIf StringInStr($class[$zCount],"Listview") Then
    $Temp=_GetListViewItems($aWinList[$iCount][1],$class[$zCount]&$count)
    For $i=1 To $Temp[0][0]
    $nCount+=1
    ReDim $aControlInfo[$nCount][7]
    $aControlInfo[$nCount - 1][0] = $aWinList[$iCount][1]
    $aControlInfo[$nCount - 1][1] = $class[$zCount]&$count
    $aControlInfo[$nCount - 1][2] = $Temp[$i][0]
    $aControlInfo[$nCount - 1][3] = "";
    If _GUICtrlListView_GetItemChecked(ControlGetHandle($aWinList[$iCount][1],"",$class[$zCount]&$count),$i-1) Then
    $aControlInfo[$nCount - 1][4] = "Checked"
    Else
    $aControlInfo[$nCount - 1][4] = ""
    EndIf
    $aControlInfo[$nCount - 1][5] = $Temp[$i][1]
    Next
    ElseIf StringInStr($class[$zCount],"Listbox") Then
    $Temp=_GetListBoxItems($aWinList[$iCount][1],ControlGetHandle($aWinList[$iCount][1],"",$class[$zCount]&$count))
    For $i=1 To $Temp[0][0]
    $nCount+=1
    ReDim $aControlInfo[$nCount][7]
    $aControlInfo[$nCount - 1][0] = $aWinList[$iCount][1]
    $aControlInfo[$nCount - 1][1] = $class[$zCount]&$count
    $aControlInfo[$nCount - 1][2] = $Temp[$i][0]
    $aControlInfo[$nCount - 1][3] = "";
    $aControlInfo[$nCount - 1][4] = "Checked"
    $aControlInfo[$nCount - 1][5] = $Temp[$i][1]
    Next
    ElseIf StringInStr($class[$zCount],"Progress") Then
    $nCount+=1
    ReDim $aControlInfo[$nCount][7]
    $aControlInfo[$nCount - 1][0] = $aWinList[$iCount][1]
    $aControlInfo[$nCount - 1][1] = $class[$zCount]&$count
    $Temp=DllCall("user32.dll", "int", "SendMessage", "hwnd", ControlGetHandle($aWinList[$iCount][1],"",$class[$zCount]&$count), "int", 0X400+8, "wparam", 0, "lparam", 0)
    If Not @error Then $aControlInfo[$nCount - 1][2] = $Temp[0]
    Else
    $nCount+=1
    ReDim $aControlInfo[$nCount][7]
    $aControlInfo[$nCount - 1][0] = $aWinList[$iCount][1]
    $aControlInfo[$nCount - 1][1] = ControlGetHandle($aWinList[$iCount][1],"",$class[$zCount]&$count)
    $aControlInfo[$nCount - 1][2] = _GetCtrlType($aWinList[$iCount][1],$class[$zCount]&$count)
    $aControlInfo[$nCount - 1][3] = _GetCtrlEnabled($aWinList[$iCount][1],$class[$zCount]&$count)
    $aControlInfo[$nCount - 1][4] = _GetCtrlChecked($aWinList[$iCount][1],$class[$zCount]&$count)
    $aControlInfo[$nCount - 1][5] = _GetCtrlText($aWinList[$iCount][1],$class[$zCount]&$count)
    If StringInStr($aControlInfo[$nCount - 1][2],"Edit") Then $aControlInfo[$nCount - 1][6] = _GetNearestStaticText($aWinList[$iCount][1],$class[$zCount]&$count)
    EndIf
    EndIf
    Else
    ExitLoop
    EndIf
    $count = $count +1
    WEnd
    Next
    EndIf
    Next
    Next
    Opt('WinSearchChildren', $OptWSC)
    Opt('WinDetectHiddenText', $OptWDHT)
    If $nCount = 1 Then Return SetError(2, 0, 0)
    $aControlInfo[0][0]=$nCount-1
    Return $aControlInfo
    EndFunc ;==>_WinGetInfoByPID

    [/autoit] [autoit][/autoit] [autoit]

    Func _GetNearestStaticText($hWnd,$sCtrl)
    Local $iCnt=0,$aPos[1][2],$aTmp,$iNear,$iNumber=1
    While 1
    $iCnt+=1
    If IsHWnd(ControlGetHandle($hWnd,"","Static"&$iCnt)) Then
    ReDim $aPos[$iCnt+1][2]
    $aTmp=ControlGetPos($hWnd,"","Static"&$iCnt)
    $aPos[$iCnt][0]=$aTmp[0]
    $aPos[$iCnt][1]=$aTmp[1]
    Else
    $iCnt-=1
    ExitLoop
    EndIf
    WEnd
    $aPos[0][0]=$iCnt
    If $iCnt<1 Then Return ""
    $aTmp=ControlGetPos($hWnd,"",$sCtrl)
    If @error Then Return ""
    $iNear=Abs($aTmp[1]-$aPos[1][1])
    For $iCnt=2 To $aPos[0][0]
    If Abs($aTmp[1]-$aPos[$iCnt][1])<$iNear Then
    $iNear=Abs($aTmp[1]-$aPos[$iCnt][1])
    $iNumber=$iCnt
    EndIf
    Next
    Return ControlGetText($hWnd,"","Static" & $iNumber)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GetListViewItems($hWnd,$hCtrl,$sRoot="")
    Local $iCnt=ControlListView ($hWnd, "", $hCtrl, "GetItemCount")
    Local $aRet[$iCnt+1][2]
    For $i=1 To $iCnt
    $aRet[$i][0]=$i
    $aRet[$i][1]=ControlListView ($hWnd, "", $hCtrl, "GetText", $i-1)
    Next
    $aRet[0][0]=UBound($aRet)-1
    Return $aRet
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GetListBoxItems($hWnd,$hCtrl,$sRoot="")
    Local $iCnt=_GUICtrlListBox_GetCount($hCtrl)
    Local $aRet[$iCnt+1][2]
    For $i=1 To $iCnt
    $aRet[$i][0]=$i
    $aRet[$i][1]=_GUICtrlListBox_GetText($hCtrl, $i-1)
    Next
    $aRet[0][0]=UBound($aRet)-1
    Return $aRet
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GetTreeViewItems($hWnd,$hCtrl,$sRoot="")
    Local $iCnt=ControlTreeView ($hWnd, "", $hCtrl, "GetItemCount", $sRoot)
    Local $aRet[$iCnt+1],$aTmp
    For $i=1 To $iCnt
    If $sRoot<>"" And StringRight($sRoot,1)<>"|" Then $sRoot&="|"
    $aRet[$i]=$sRoot&"#" & String($i-1)
    $aTmp=_GetTreeViewItems($hWnd,$hCtrl,$sRoot&"#" & String($i-1))
    _ArrayConcatenate($aRet,$aTmp)
    Next
    $aRet[0]=UBound($aRet)-1
    Return $aRet
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetCtrlEnabled($hWnd,$sCtrl)
    Local $sState=""
    If ControlCommand($hWnd,"",$sCtrl,"IsEnabled", "") Then
    $sState="Enabled"
    Else
    $sState="Disabled"
    EndIf
    Return $sState
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetCtrlChecked($hWnd,$sCtrl)
    Local $sState=""
    If StringInStr($sCtrl,"Button")=0 And StringInStr($sCtrl,"CheckBox")=0 Then Return ""
    If ControlCommand($hWnd,"",$sCtrl,"IsChecked", "") Then Return "Checked"
    Return ""
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetCtrlType($hWnd,$sCtrl)
    If StringInStr($sCtrl,"Edit") Then Return "Edit"
    If StringInStr($sCtrl,"ComboBox") Then Return "ComboBox"
    If StringInStr($sCtrl,"CheckBox") Then Return "CheckBox"
    If StringInStr($sCtrl,"Button") Then
    Local Const $GWL_STYLE = 0xFFFFFFF0
    Local $hCtrl = ControlGetHandle($hWnd, "", $sCtrl)
    Local $style = _WinAPI_GetWindowLong($hCtrl, $GWL_STYLE)
    If BitAND($style,0x0000000b)=0x0000000b Then
    Return "Button"
    ElseIf BitAND($style,2)=2 Then
    Return "CheckBox"
    ElseIf BitAND($style,4)=4 Then
    Return "CheckBox"
    ElseIf BitAND($style,9)=9 Then
    Return "CheckBox"
    Else
    Return "Button"
    EndIf
    EndIf
    ;Return $sCtrl
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetCtrlText($hWnd,$sCtrl)
    Local $hCtrl = ControlGetHandle($hWnd, "", $sCtrl)
    Local $sText=""
    $sText=ControlGetText($hWnd,"",$hCtrl)
    If @error Then Return ""
    If StringInStr($sCtrl,"ComboBox") Then $sText&="|" & _GUICtrlComboBox_GetList($hCtrl)
    If @error Then Return ""
    Return StringLeft($sText,100)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _GetCtrlClass($sClasslist,$sClass)
    Local $aSplit=StringSplit($sClasslist,@LF)
    For $i=1 To $aSplit[0]
    If StringInStr($aSplit[$i],$sClass) Then Return $aSplit[$i]
    Next
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _ProcessGetChildren($i_pid) ; First level children processes only
    Local Const $TH32CS_SNAPPROCESS = 0x00000002
    Local $a_tool_help = DllCall("Kernel32.dll", "long", "CreateToolhelp32Snapshot", "int", $TH32CS_SNAPPROCESS, "int", 0)
    If IsArray($a_tool_help) = 0 Or $a_tool_help[0] = -1 Then Return SetError(1, 0, $i_pid)
    Local $tagPROCESSENTRY32 = _
    DllStructCreate _
    ( _
    "dword dwsize;" & _
    "dword cntUsage;" & _
    "dword th32ProcessID;" & _
    "uint th32DefaultHeapID;" & _
    "dword th32ModuleID;" & _
    "dword cntThreads;" & _
    "dword th32ParentProcessID;" & _
    "long pcPriClassBase;" & _
    "dword dwFlags;" & _
    "char szExeFile[260]" _
    )
    DllStructSetData($tagPROCESSENTRY32, 1, DllStructGetSize($tagPROCESSENTRY32))
    Local $p_PROCESSENTRY32 = DllStructGetPtr($tagPROCESSENTRY32)
    Local $a_pfirst = DllCall("Kernel32.dll", "int", "Process32First", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pfirst) = 0 Then Return SetError(2, 0, $i_pid)
    Local $a_pnext, $a_children[11][2] = [[10]], $i_child_pid, $i_parent_pid, $i_add = 0
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    $i_add += 1
    $a_children[$i_add][0] = $i_child_pid
    $a_children[$i_add][1] = DllStructGetData($tagPROCESSENTRY32, "szExeFile")
    EndIf
    EndIf
    While 1
    $a_pnext = DLLCall("Kernel32.dll", "int", "Process32Next", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pnext) And $a_pnext[0] = 0 Then ExitLoop
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    If $i_add = $a_children[0][0] Then
    ReDim $a_children[$a_children[0][0] + 11][2]
    $a_children[0][0] = $a_children[0][0] + 10
    EndIf
    $i_add += 1
    $a_children[$i_add][0] = $i_child_pid
    $a_children[$i_add][1] = DllStructGetData($tagPROCESSENTRY32, "szExeFile")
    EndIf
    EndIf
    WEnd
    If $i_add <> 0 Then
    ReDim $a_children[$i_add + 1][2]
    $a_children[0][0] = $i_add
    EndIf
    DllCall("Kernel32.dll", "int", "CloseHandle", "long", $a_tool_help[0])
    If $i_add Then Return $a_children
    Return SetError(3, 0, 0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    lgE

  • Sieht doch ganz gut aus ;)Lleider konnte ich es noch nicht testen, daher weiß ich leider auch nicht genau ob es vllt schon drin ist, aber man könnte es doch auch so machen, dass man mehrere Dateien auswählen kann und dann alle hintereinander installeirt werden.