Jump to content
Sign in to follow this  

Update your scripts/programs!

Recommended Posts

Hello i dont know, who know it, or who dont know, but i created a script what update your script.You can add it to a button or just when started.

IniWrite(@ScriptDir "\ver.ini", "section", "key", "1.0")
;------------------------------------------------------- if you created the ini delete that line!!!!

InetGet("YOURWEBSITELINK/VER.INI", @ScriptDir & "\ver.ini")
$ver = IniRead(@ScriptDir & "\ver.ini", "section", "key", "1.0")
If $ver > "0.9" Then

So.It is downloads an ini, and in the ini 1.0. If $ver bigger than 0.9 then downloads your exe, and overwrites your program.

Sorry for my bad english.

Share this post

Link to post
Share on other sites

This works much better.

#Include <Misc.au3>
If @IPAddress1 <> "" Then
  InetGet($aSiteAdress & "/Updater.ini", @TempDir & "\Updater.ini", 1)
  $fetch_Version = IniRead(@TempDir & "\Updater.ini", "details", "version", "")
  $versionUpdate = _VersionCompare($fetch_Version, FileGetVersion(@ScriptFullPath))
  If $versionUpdate <> 0 Then ; 0 means they are the same version.
   $update_DL = InetGet($aSiteAdress & "/PROGRAM.exe", $ScriptPath, 1, 1) ; i recommend that you write it to another location, then install it using another program, like an updater.exe
Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...