Jump to content

How to make an auto update feature


Wisniske
 Share

Recommended Posts

I am looking for a way to make my Bot check for an update from the web before running. If the version number (or whatever) does not match it will update the .exe file automatically, then restart the Bot.

Any help would be great, Thanks in advance..

Link to comment
Share on other sites

Hi

what bot what script what site to look to verify?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

i think he meant his own program. I'm trying to make this too but i dont know how. I think he meant like before opening up the program, it will do a version check with the latest version. if version code does not match it will download the update from the designated location, if it matches it will just run the program

Link to comment
Share on other sites

It's a bot to vote on line (long story, sad really :P ), will be going to my website to update, I am just looking for a generic way to do it. The entire bot is made in AutoIt, I do have an installer, so even if I had to add a small program or another .au3 file that would be fine...

Link to comment
Share on other sites

i think he meant his own program. I'm trying to make this too but i dont know how. I think he meant like before opening up the program, it will do a version check with the latest version. if version code does not match it will download the update from the designated location, if it matches it will just run the program

Yes, exactly.....

Link to comment
Share on other sites

  • Moderators

FileWrite() / Or IniWrite() -- InetGet() / FileWrite/FileRead or IniRead -- Func to Read Ini(s) or File(s) / Compare the 2, if InetGet() File is greater then prompt for download.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

what about almost like a RSS Feed works isnt there something that u can do say if you had a webpage..(someone made something to read xml)

I've made something like that... But it involves the steps I mentioned above.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

; I would like to thank SmOKe N, and Gene from this forum for the information

;What I have done is downloaded the version.ini file, and checked it with the version number.

;If the version number is less than the current version it will get the size of the update file

;and download the update file to the correct folder while verifying size.

;If the size does not match it will error out and time out in 10 seconds

;Check out Gene's take on this subject

; http://www.autoitscript.com/forum/index.ph...mp;#entry174804

InetGet("http://www.website.com/downloads/version.ini", "version.ini")

$chk = IniRead("version.ini", "version", "ver", "NotFound")

If $chk > 1.2 Then

$size = InetGetSize("http://www.website.com/downloads/BOT.exe")

InetGet("http://www.website.com/downloads/BOT.exe", "c:\Program Files\BOT\BOT.exe", 1, 1)

While @InetGetActive

TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 5, 16)

Sleep(250)

WEnd

If @InetGetBytesRead <> $size Then MsgBox(16, "BOT Update", "Error occurred During Update", 10)

Else

EndIf

;BOT code here

Edited by Wisniske
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...