How to provide software updates

knappster

Active member
Joined
Nov 13, 2006
Messages
42
Programming Experience
Beginner
Hi,
I have a program that I have written and am going to put it on my website for people to use. However, I was wondering what is the best way of going about providing updates to my program? I don't want to get people to download the whole program every time I issue an update, how do you go about providing updates with just what has changed between versions?
Cheers.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,412
Location
Norway
Programming Experience
10+
Your "check for updates" routine can download a configuration file from your webserver. This should be an xml file for easiest handling, and it should specify files and versions that the local app can compare to see if any newer. XmlDocument class can be used both to get that file and read the info. If a newer file is detected you should launch a separate "updater" application and close the main app (to unlock files in use), the updater can download the specified files and launch the main app again afterwards. Use for example My.Computer.Network.DownloadFile(...) to get new files.

You have to update complete files (compiled usually), for example the main .exe or one of the class libraries (.dll) or other single files, you can't change only one method or one class in the application and deploy only that.
 

shawne

Well-known member
Joined
Feb 22, 2006
Messages
103
Location
Pennsylvania
Programming Experience
10+
I just recently went through this myself and basically used the same idea most online games use. I don't know if its the best method or not, but it works for me.

Instead of having the user run the application itself, I have them run a launcher app. The launcher downloads an XML file which contains a manifest of my latest updates. It then compares it with the previous one downloaded and if there is something new, it will download the updates. Once everything is updated, the launcher runs my application and then closes itself. During the whole process, I through up a splash screen for the launcher so the user can see whats going on. Also, if there is no internet connection, then obviously updating does not occur.

EDIT:

I also wrote a small program to use on my end which actually allows me to pick and choose my updated files, generates my XML and copies them all to my web-directory.
 
Last edited:

knappster

Active member
Joined
Nov 13, 2006
Messages
42
Programming Experience
Beginner
Cheers for your replies. I was thinking about using XML so that looks like the best way of going about it. I'll think I'll split the program up into loads of dll's first so that sections can be updated independently...
 

giadich

Well-known member
Joined
May 20, 2007
Messages
260
Location
Houston, TX
Programming Experience
5-10
Question: Instead of downloading the whole xml configuration file, wouldn't it be better if you give the file some sort of a version number and compare these numbers? If they are different then download it and then update...
 

shawne

Well-known member
Joined
Feb 22, 2006
Messages
103
Location
Pennsylvania
Programming Experience
10+
Ya, I could, but the codes already written and were talking about a file thats 1k in size, so i'm not likely to re-visit the code.
 
Top Bottom