Hallo
leider schaff ich es nicht meine Updater zu Updaten
ich mach das über
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.2.10.0
Author: Ueffinger
Script Function:
Updaten von ABC Programm Cliets
#ce ----------------------------------------------------------------------------
Const $Url = "http://ABC.de/ABC-programm/"
Const $tempIni = @TempDir & "\"& Random(10000,99909,1) & ".ini"
Const $g_szVersion = "ABC Updater 1.0"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)
if @AutoItExe=="updater1.exe" Then
ProcessClose("updater.exe")
Sleep(500)
FileDelete("updater.exe")
FileInstall("updatea.bat","update.bat",1)
Exit
ElseIf FileExists("updater1.exe")Then
run("updater1.exe")
Exit
EndIf
ProgressOn($g_szVersion, "Bitte Warten", "0 % ca.")
if FileExists("update.bat") Then
FileDelete("update.bat")
EndIf
InetGet($url& "update.php",$tempIni,1)
$fileAnzahl = IniRead($tempIni,"Info","FilesZahl",0)
ProgressSet( "3","3%","Holle die Infos aus den Internet")
FileInstall("MD5Hash.dll","MD5Hash.dll")
$prozzent = 100/$fileAnzahl
For $i = 1 To $fileAnzahl
$name = IniRead($tempIni,$i,"filename",0)
$md5_online = StringLower (IniRead($tempIni,$i,"md5",0))
if FileExists($name) Then
$md5_client = StringLower (file_hash($name))
if $md5_client <> $md5_online Then
_ExeHoller($name)
EndIf
Else
_ExeHoller($name)
EndIf
ProgressSet( $i*$prozzent,Round($i*$prozzent,0)&"%","Habe " & $name & " Geckecht")
Next
ProgressSet(100 , "Fertig", "Complete")
sleep(500)
if @Compiled==1 Then
FileDelete("MD5Hash.dll")
EndIf
FileDelete($tempIni)
ProgressOff()
Exit
func _ExeHoller($exename)
if FileExists($exename)Then
FileDelete($exename)
EndIf
if $exename == "updater.exe" Then
InetGet($url &$exename,"updater1.exe",1)
Else
InetGet($url &$exename,$exename,1)
EndIf
EndFunc
func file_hash($file)
$plH = PluginOpen("MD5Hash.dll")
$data = MD5Hash($file, 1, True)
PluginClose($plH)
Return $data
EndFunc
Hat wer eine idee ?