Click to See Complete Forum and Search --> : Code needed for automatic software update through Internet


Kaizen
August 19th, 2000, 11:33 AM
I've searched and found no code on software update by Internet. Some gurus out there may be interested in writing a class CURLFileUpdate (MFC-MDI framework):

(a) to read a list of {FileName, nVersion } from a given "Versions.ini" file.

(b) to acess a file at a given URL to check for info (e.g. {FileName, nLatestVersion, bCritical} on files that are new or have later version, and to allow downloading these files and store them in a specified path.

(c) to update the "Versions.ini" file

(d) to allow the app to exit and then re-execute itself if any of the updated files is critical.

Such a class would be very useful to a lot of programmers. I could cook up one for items (a,b,c), but I'll be stuck at (d) and the result will be pretty pathetic!!.

Caliban Darklock
May 1st, 2001, 03:13 AM
> I could cook up one for items (a,b,c), but I'll
> be stuck at (d) and the result will be pretty
> pathetic!!.

My solution to this was to write a separate update application which in your case would do a, b, and c. I covered d by having the main application spawn the update application and *close* itself. (You really don't want the user doing anything in your main app while you're updating it, anyway.) When the update application finishes, I simply restart the main application and have the update application close itself as well. Simple, straightforward, and it works quite well.


----
Caliban Tiresias Darklock
Darklock Communications
"Pain has a face... allow me to show it to you."
-----

jagmel
June 6th, 2001, 08:15 AM
I think it is an exellent idea for this project,I am stuck at the moment and not sure how to read all the files on a web directory, and do a compair with the local files.
(d) option is not that important at this stage, after downloading newer files, one can restart the application for the changes to take effect.
I need help with the versions.ini file.How do I create and update