Valhalla Legends Forums Archive | Visual Basic Programming | How to make an Automatic Update feature?

AuthorMessageTime
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.
October 9, 2004, 11:47 PM
Quarantine
I think there is a GetInternetFile function google it and use Kill to delete the old one.
October 10, 2004, 12:25 AM
phvckmeh
[quote author=Warrior link=topic=9070.msg83792#msg83792 date=1097367921]
I think there is a GetInternetFile function google it and use Kill to delete the old one.
[/quote]

K ill try
October 10, 2004, 12:46 AM
phvckmeh
how would i get the version of a 3rd party exe?
GetExeVersion?
October 10, 2004, 1:35 AM
Tuberload
[quote author=phvckmeh link=topic=9070.msg83802#msg83802 date=1097372104]
how would i get the version of a 3rd party exe?
GetExeVersion?
[/quote]

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?
October 10, 2004, 2:08 AM
phvckmeh
[quote author=Tuberload link=topic=9070.msg83807#msg83807 date=1097374104]
[quote author=phvckmeh link=topic=9070.msg83802#msg83802 date=1097372104]
how would i get the version of a 3rd party exe?
GetExeVersion?
[/quote]

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]

Yes but i made the updater.exe seperate. So then i could download and replace the old bot.exe
October 10, 2004, 2:15 AM
St0rm.iD
Seems like a waste to download a whole exe file just to check its version.
October 10, 2004, 3:05 AM
phvckmeh
[quote author=Banana fanna fo fanna link=topic=9070.msg83816#msg83816 date=1097377530]
Seems like a waste to download a whole exe file just to check its version.
[/quote]

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
October 10, 2004, 3:45 AM
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.
October 10, 2004, 5:33 AM
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 -.-
October 10, 2004, 2:33 PM
Quarantine
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
October 10, 2004, 5:05 PM

Search