• Welcome to Valhalla Legends Archive.
 

How to make an Automatic Update feature?

Started by phvckmeh, October 09, 2004, 06:47 PM

Previous topic - Next topic

phvckmeh

Alright I use Visual Basic 6 and I was wondering how I would implement an automatic update feature in my programs. What ive done so far is host (on my webserver) a currentversion.txt with the current version inside. then i have the new exe uploaded too. I used microsoft's INET control to open the txt file, see if it is the current version, and if it is, to download the exe file. Only problem is, inet is so fucken screwed up, sometimes it works, sometimes it dosent. while its running the whole program freezes, etc etc.
my other question would be, once it downloads the new EXE how would it automaticaly replace the old exe with the new one?

Thanks guys.

Warrior

I think there is a GetInternetFile function google it and use Kill to delete the old one.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

phvckmeh

Quote from: Warrior on October 09, 2004, 07:25 PM
I think there is a GetInternetFile function google it and use Kill to delete the old one.

K ill try

phvckmeh

how would i get the version of a 3rd party exe?
GetExeVersion?

Tuberload

Quote from: phvckmeh on October 09, 2004, 08:35 PM
how would i get the version of a 3rd party exe?
GetExeVersion?

If you are trying to update your own program why would you need to get the version of a 3rd party exe? Aren't you interested in your programs version? In that case isn't there like an "App.Version" method or something?
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

phvckmeh

Quote from: Tuberload on October 09, 2004, 09:08 PM
Quote from: phvckmeh on October 09, 2004, 08:35 PM
how would i get the version of a 3rd party exe?
GetExeVersion?

If you are trying to update your own program why would you need to get the version of a 3rd party exe? Aren't you interested in your programs version? In that case isn't there like an "App.Version" method or something?

Yes but i made the updater.exe seperate. So then i could download and replace the old bot.exe

Banana fanna fo fanna

Seems like a waste to download a whole exe file just to check its version.

phvckmeh

Quote from: Banana fanna fo fanna on October 09, 2004, 10:05 PM
Seems like a waste to download a whole exe file just to check its version.

i download a txt file, then comapre the version stated in the txt file to the version i checked from the bot.exe, and if there is a new version avalible i would then proceed to download the new exe

Grok

I do this for my customers on two of my client applications.  On a shared network directory there is an INI file telling the version number and EXE name, such as:

[General]
Version=3.7
EXEName=\\xyzapps\thisprog\exe\GroksApp3.7.exe

The client checks his own version number and compares it to the version number claimed to be required by the INI.  If the INI version is DIFFERENT (as opposed to just greater-than), the client renames itself to GroksApp.tmp (first deleting any existing GroksApp.tmp), then downloads the correct version from the server to the client.  When copying to the client, it renames it to GroksApp.exe, regardless of the version.

This way if you put a version out there that has bugs, you can quickly roll-back to a previous version by changing the version number back one or two.

zeth369

im kinda trying to do the same thing..
what im doing is when somebody types '/getbot' it downloads the bot for them..
what im trying to do is replace the old bot.. with the new bot.. but i dont really know how -.-

Warrior

I did it almost the same way grok did but I read the Version from a .txt ,closed bot.exe, ran the Patcher.exe , deleted Bot.exe , downloaded new Bot.exe  opened bot
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?