#NoTrayIcon
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Compile Date|%date% %time%
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs 0 /cn 0 /cf 0 /cv 0 /sf 1 /sv 1
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Crypt.au3>
; #FUNCTION# ====================================================================================================================
; Name ..........: _EXE_Update
; Description ...: Checks the MD5 of an EXE File/AutoIT Script and updates the EXE.
; Syntax ........: _EXE_Update($sEXEFullPath, $sNewEXEMD5, $sNewEXEUrl)
; Parameters ....: $sEXEFullPath - A string value.
; $sNewEXEMD5 - A string value.
; $sNewEXEUrl - A string value.
; Return values .: None
; AutoIt Version.: 3.3.8.1+
; Author ........: Achat (www.elitepvpers.com)
; Modified ......:
; Remarks .......: Just compile that script and run it from your main script (FileInstall & Run/ShellExecute).
; Related .......: Requires #include <Crypt.au3> [Updater Script]
; Link ..........:
; Example .......: Yes
; ===============================================================================================================================
#cs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Example -- Main Script~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FileInstall('C:\FileInstall\_EXE_Update.exe', @ScriptDir & '\_EXE_Update.exe',1)
ShellExecute(@ScriptDir & '\_EXE_Update.exe', @ScriptFullPath &'|'&'1e996be9f8d39c37c1ba2bb54c30976f'&'|'&'http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe')
Exit
[IMG]http://i.epvpimg.com/SfN8g.png[/IMG]
#ce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Example -- Main Script~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#region Updater
Local $a1DsParameters = StringSplit($CmdLineRaw, '|', 2)
If UBound($a1DsParameters, 1) <> 3 Then Exit
If FileExists($a1DsParameters[0]) = 0 Then Exit
_EXE_Update($a1DsParameters[0], $a1DsParameters[1], $a1DsParameters[2])
Func _EXE_Update($sEXEFullPath, $sNewEXEMD5, $sNewEXEUrl)
$sNewEXEMD5 = StringUpper($sNewEXEMD5)
ToolTip('#Update---> Update in progress... please wait.' & @CRLF & _
'#Update---> Path to local EXE: ' & $sEXEFullPath & @CRLF & _
'#Update---> ' & StringTrimLeft(_Crypt_HashData($sEXEFullPath, $CALG_MD5), 2) & ' <--- MD5 Hash of the local EXE' & @CRLF & _
'#Update---> ' & $sNewEXEMD5 & ' <--- MD5 Hash of the remote EXE ' & @CRLF & _
'#Update---> Url to remote EXE: ' & $sNewEXEUrl, 0, 0, '#--->Update<---#')
If StringTrimLeft(_Crypt_HashFile($sEXEFullPath, $CALG_MD5), 2) <> $sNewEXEMD5 Then
InetGet($sNewEXEUrl, @TempDir & '\update.tmp', 1)
Else
Exit
EndIf
If StringTrimLeft(_Crypt_HashFile(@TempDir & '\update.tmp', $CALG_MD5), 2) = $sNewEXEMD5 Then
$iReturn = FileMove(@TempDir & '\update.tmp', $sEXEFullPath, 1)
If $iReturn <> 1 Then
Exit
EndIf
FileDelete(@TempDir & '\update.tmp')
ToolTip('#Update---> Update successful', 0, 0)
ShellExecute($sEXEFullPath)
Else
FileDelete(@TempDir & '\update.tmp')
ToolTip('#Update---> Update failed. MD5 hash mismatch.', 0, 0)
EndIf
Sleep(5000)
ToolTip('')
EndFunc ;==>_EXE_Update
#endregion Updater
Verwendung:
Ihr müsst das Script einfach kompilieren. Dann erhaltet ihr eine Updater.exe. Diese installiert ihr dann z.B. mit FileInstall in euer Hauptprogramm (es muss nicht mit AutoIt geschrieben sein).
Dann braucht ihr noch eine Datei im Internet, in der die aktuelle Version eures Programms steht, sowie MD5 einer neuen Version und die URL zur neuen Version. So prüft ihr dann in eurem Hauptprogramm, ob die aktuelle Version der Version in der Datei entspricht. Wenn das nicht der Fall ist, führt ihr einfach die Updater.exe mit Parametern aus:
Code:
@ScriptFullPath&'|'&'MD5Hash der neuen Version'&'|'&'Link zur neuen Programmversion'
Und schließt danach euer Hauptprogramm.
Wenn das Update abgeschlossen ist, wird euer Programm wieder gestartet.
Im Script oben findet ihr auch ein Beispiel.
Feedback ist erwünscht
english:
Function / program to update programs.
Read comments in .au3 file...
If you have any questions, feel free to ask me.
[Release]Updater.exe 10/17/2011 - Coding Releases - 10 Replies Hello I have made a Updater.
Ill explain how it works.
1.I have opened a Account at Rip Way
2.I created 2 text files one with the current version and one with the current download link.
3.I created a vb.net applications that reads whatever is in those two links.
4.If you update the hack you only need to change the version on the first link and the download link writen in the second link.
[Release(ish)]New OS Updater 08/12/2011 - Shaiya PServer Guides & Releases - 12 Replies Just got this from Aeria's client. Yeah I know anyone can get it, but meh.
Going to test it later, to be sure it works right and the such. I set it to 127.0.0.1 to update from, and the background of the updater you'd need to copy/change is this link: Shaiya
http://i56.tinypic.com/jrd1s8.jpg
Have fun. :P
*Edit* Just tested it, changed TEST_IP.127.0.0.1 to my own server IP, and it works just fine. Curious, does anyone know/remember how to update the updater in a patch? |D
[Release]New GW Mem Updater 07/07/2010 - GW Exploits, Hacks, Bots, Tools & Macros - 22 Replies So da mein alter verschwunden ist, und ich keine Ahnung hab warum.
Werde ich nun hier mein verbesserten + schneller Updater releasen!
Wie immer gilt als Admin starten!
After my old Updater is gone, without a warning.
I release my new faster + better Updater.
Don´t forget to start it with Admin Rights!
[Release] Non-Div Updater 06/10/2010 - Dekaron Private Server - 25 Replies Hi,
we use this updater over a month now and ... its works perfect for dkveterans.
Its time to release this updater
this updaters was made for "KAL ONLINE" but works for other games also
Positive:
Fast download
Instant update