Sign in to follow this  
Followers 0
SlavikMan

need some help with updater

16 posts in this topic

so i have a little program and i wanted to know how can i make her update when i say click a UPDATE button

i have a storage and i think i need to make an ini file for this and put it in my website

i use an UCOZ.com website and i just want the program to check if there is any updates and when there are updates to download them

can someone explain it to me please

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Have a look at the InetFileUpdate UDF in my signature. It may give you the help you are after.

Edit: Typo

Edited by PartyPooper

Share this post


Link to post
Share on other sites

too much high language cant you make it simple?

Share this post


Link to post
Share on other sites

Wow, I thought I had commented it enough. I'm not trying to discourage you but updating a running file via the internet isn't a simple matter for someone who's new to AutoIt as there are many checks that need to be done. Considering my UDF does all those checks for you and all you have to do is include it and call it in any code you write, perhaps before you begin to fly, you may have to learn to walk by understanding a little more about AutoIt by using the examples it contains in the Help File. Specifically, have a look at the keywords, InetGet, InetGetSize, IniRead, _VersionCompare and most of the File... keywords under the File, Directory and Disk Management function.

Share this post


Link to post
Share on other sites

maybe it helps

Global $rev = 10

_Update($rev) ;check for updates

;         or

_Update();Force update

Func _Update($ver = 0)
    Local $FILE_t = "\version.txt"
    Local $UPDATETXT = "http://domain.com/update.txt"
    Local $UPDATEEXE = "http://domain.com/installer.exe"
    InetGet($UPDATETXT, @TempDir & $FILE_t)
    Local $FILEHANDLE2 = FileOpen(@TempDir & $FILE_t, 0)
    Local $VER1 = FileReadLine($FILEHANDLE2, 1)
    FileClose($FILEHANDLE2)
    ConsoleWrite(@CRLF & "Local Version:" & $ver)
    ConsoleWrite(@CRLF & "Server Version:" & $VER1)
    If $ver >= $VER1 Then
        TrayTip("", "No Update needed...", 2)
        Return
    EndIf
    TrayTip("", "Updating to Rev: " & $VER1 & " ! Please Wait...", 1)
    Local $changelog = "http://domain.com/changelog.txt"
    InetGet($changelog, @ScriptDir & "\changelog.txt")
    ShellExecute(@ScriptDir & "\changelog.txt", "", @ScriptDir, "edit")
    ConsoleWrite(" UPDATING")
    InetGet($UPDATEEXE, @ScriptDir & "\Installer.exe")
    Run(@ScriptDir & "\Installer.exe")
    Exit
EndFunc   ;==>_Update

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"

Share this post


Link to post
Share on other sites

this i understand a little more i will try it and tell you if it helped

Share this post


Link to post
Share on other sites

this i understand a little more i will try it and tell you if it helped

Share this post


Link to post
Share on other sites

this i understand a little more i will try it and tell you if it helped

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Oops srry guys it was an exident please delete them ot something

and do you know how can i make an installation to my program?

Edited by SlavikMan

Share this post


Link to post
Share on other sites

there are many free programs that allow you to set up files you need installed, but i like to use this one:

http://www.download.com/Install-Creator/30...4-10218346.html

and also my choice... ClickTeam's this product Rocksss!


Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel

Share this post


Link to post
Share on other sites

yes but with this script it opens me a dos and does nothing no updates no nothing(its not sepose to be dos its sepose to be installation)

Share this post


Link to post
Share on other sites

you can also create a good looking Installer with autoit.


Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel

Share this post


Link to post
Share on other sites

the updater dosent work

Share this post


Link to post
Share on other sites

maybe you should change some vars to meet your scenario.

Try manual download the link, to confirm the it.

The path/names its case sensitive, if you are downloading from a Linux server.

Also, run it in debug mode, and see what is missing.

Kind regards, Linux


You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"

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  
Followers 0