Was genau hab ich falsch gemacht? Der Link wird aus der heruntergeladenen Ini gelesen, diese Datei aber funktioniert... (Links zensiert)
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
Global $SA = "S", $Prozent = "0", $Size = "0"
[/autoit] [autoit][/autoit] [autoit]AdlibEnable("_check", 100)
[/autoit] [autoit][/autoit] [autoit]Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Installationsassistent", 238, 133, 193, 125)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Edit1 = GUICtrlCreateEdit("", 8, 8, 225, 65, BitOR($ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("Herzlich Willkommen beim \r\nInstallationsassistenten für Multivision!\r\nErforderliche Dateien werden aus dem Intenet \r\ngesucht. Bitte warten Sie einen Moment..."))
$Progress1 = GUICtrlCreateProgress(8, 80, 225, 17)
$Button1 = GUICtrlCreateButton("Start", 8, 104, 225, 25, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
While 1
Sleep(100)
WEnd
Func Button1Click()
If $SA = "A" Then _exit()
If $SA = "S" Then _start()
EndFunc ;==>Button1Click
Func Form1Close()
_exit()
EndFunc ;==>Form1Close
Func _exit()
$iMsgBoxAnswer = MsgBox(292, "Installationsassistent", "Setup wirklich beenden?")
If $iMsgBoxAnswer = 6 Then Exit
EndFunc ;==>_exit
Func _start()
$SA = "A"
GUICtrlSetData($Button1, "Abbrechen (Vorbereiten...)")
$Download = InetGet("http://__________setup.ini", @ScriptDir & "\setup.ini", 1)
$Download = IniRead("setup.ini", "Allgemein", "Haupt", "0")
If $Download = "0" Then
$iMsgBoxAnswer = MsgBox(20, "Installationsassistent", "Es wurde kein Downloadlink für die Hauptsetup gefunden." & @CRLF & @CRLF & "Wollen Sie den Link manuell eintippen?")
If $iMsgBoxAnswer = 6 Then $Download = InputBox("Installationsassistent", "Tippen Sie hier Ihren Link inklusive der Datei (.exe) ein:", "", " ", "-1", "-1", "-1", "-1")
If $iMsgBoxAnswer = 7 Then Exit
If @error = 1 Then Exit
If @error = 3 Then $sToolTipAnswer = ToolTip("Interner Fehler. Programm wird abgebrochen.", Default, Default, "Installationsassistent", 3, 2)
EndIf
$Size = InetGetSize($Download)
$AltProzent = "0"
InetGet($Download, @ScriptDir & "\install.exe", 1)
While @InetGetActive
$Prozent = Round(100 * @InetGetBytesRead / $Size)
If $Prozent <> $AltProzent Then
$AltProzent = $Prozent
GUICtrlSetData($Progress1, $Prozent)
GUICtrlSetData($Button1, "Abbrechen (" & $Prozent & "%)")
EndIf
WEnd
$Download = MsgBox(65, "Installationsassistent", "Sammeln der Informationen abgeschlossen. Starte nun Setup")
If $Download = 2 Then Exit
If $Download = 1 Then
Run("install.exe")
Exit
EndIf
EndFunc ;==>_start
Func _check()
$msg = GUIGetMsg()
If $msg = $Button1 Then Button1Click()
If $msg = $GUI_EVENT_CLOSE Then Form1Close()
EndFunc ;==>_check