Click here to Skip to main content
14,605,816 members

Automatic Online Update Toolkit

Rate this:
4.41 (24 votes)
Please Sign up or sign in to vote.
4.41 (24 votes)
26 Oct 2004
Update toolset with update client, creator and server-script


This is a set of tools with which you can easily distribute automatic software updates to your clients.

picture #1

As you see in picture1 the ideal workflow to your clients is a direct line.
To get such an theoretical way working in an acceptbale way (in this solution), you will need to take the detour to the webserver. That means:

  • You publish your updates to your webserver
  • Your Application running at the customers site will fetch and install them automatically

How does it work?

picture #2

As you see in picture2 the update-toolset consists of 3 different parts:

  • the Updatecreator at the producers site - With the tool, your update is packed and distributed out to the world.
  • the Updateclient at the customers site - This class is inserted in your app. You're responsible to call for it. (for example each time the application starts up or periodically)
  • the Client Updater at the customers site - This is a standalone-program that is called and configured by the Updateclient-class; it closes down the main application, does the unpacking and copying and restart the application finally.
  • the Webserver anywhere accessible by both - The Webserver stores the update-information and the update-files; currently with mysql/php and for uploading ftp
This program uses

Explanation of the basic functions


(see picture3)
  1. Project is compiled
  2. packed
  3. uploaded to the webserver
  4. online-database is updated with the new version

picture #3


(see picture4)
  1. UpdateClient is called to check for updates
  2. it request the actual version from the webserver
  3. it recaives the actual version number and compares it to its own hardcoded number
  4. when the online-version is newer, the update is fetched, otherwise the updatecheck is finished at this step.
  5. receive the update-file and saves it to a temporary folder
  6. unpacks to that temporary folder
  7. atm: only copies all content over the old one, without checking something

picture #4

Using the code

Set up the mysql table at the webserver:
# Table structure for table `version`

CREATE TABLE version (
  projectid int(11) NOT NULL default '0',
  projectname text NOT NULL,
  actualversion int(11) NOT NULL default '0',
  PRIMARY KEY  (projectid)

Create a update.php script with following content:

mysql_connect("","dbuser","dbpassword") or die(mysql_error());
mysql_select_db("mydb") or die(mysql_error());
 case "check": 
"SELECT * FROM version WHERE projectname='".$_GET["project"]."'");
  echo $arr["actualversion"];
 case "setnew": 
"UPDATE version SET actualversion=".$_GET["version"]." 
WHERE projectname='".$_GET["project"]."'");
} // switch

Upload the update.php to the location specified in your updateclients. Don't forget to create the directory for the updates! integrate it into your application:

Public Class Form1
    Dim WithEvents updater As updateclient.clsClient
    Private Sub Form1_Load(ByVal sender As System.Object,
 ByVal e As System.EventArgs) Handles MyBase.Load
        updater = New updateclient.clsClient
        updater.CheckForNewVersion(ProjectName, VersionNumber, 
ProjectName, Application.ExecutablePath)
    End Sub
    Private Sub updater_endall() Handles updater.endall
    End Sub
End Class
Module Module1
    Public Const ProjectName As String = "yourappname"
    Public Const VersionNumber As Integer = 25
    Public VersionDate As Date = New Date(2004, 10, 25) 'not used yet!
End Module

Points of Interest

Updates become more and more important in this fast-moving buisness. This toolset is just a fast-hacked starting point using the concept mentioned. You'll note that there exists no error handling, and many many more usefull features that are not included yet. Can your improve the concept or the toolset in any way?


  • 10/27/2004 first release


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Germany Germany
Thomas is interested in technical programming, networking and security technologies.

Currently he's studying at a german university

Comments and Discussions

Generalthank you Pin
Reza Zanganeh8-Sep-15 18:00
MemberReza Zanganeh8-Sep-15 18:00 
Questionwhen I run the updatecreator to create an new project it shows in mysql(phpmyadmin) no entry Pin
timnboys19-Jun-11 11:00
Membertimnboys19-Jun-11 11:00 
GeneralNice idea... too complex. Pin
Destiny77714-Apr-08 9:05
MemberDestiny77714-Apr-08 9:05 
GeneralHello Pin
ehrenberg25-Feb-08 20:50
Memberehrenberg25-Feb-08 20:50 
GeneralToooooooooo Complicated !!!! Pin
abhi131016-Apr-07 0:31
Memberabhi131016-Apr-07 0:31 
QuestionHow to get on the FTP? [modified] Pin
unique_2421-Jun-06 1:34
Memberunique_2421-Jun-06 1:34 
GeneralWindows Update. Pin
HakunaMatada14-Dec-05 1:33
MemberHakunaMatada14-Dec-05 1:33 
GeneralRe: Windows Update. Pin
Nikola Knezevic6-Mar-07 1:24
MemberNikola Knezevic6-Mar-07 1:24 
GeneralMaybe future version should have this ... Pin
Vertyg07-Dec-05 8:02
MemberVertyg07-Dec-05 8:02 
GeneralLive Update App @ PSC Pin
Igor Krupitsky27-May-05 10:16
mvaIgor Krupitsky27-May-05 10:16 

I really liked your application. However, I feel that the entire architecture can be reduced into a single app. By checking the Last Modified date of the zip file you can get rid of version checking mechanism.

Please check my “Live Update” application I have created inspired by your program. It also supports:

1) Encryption
2) Multiple folders in the zip file
3) Progress bar for downloading, unzipping and copying

I hope that we can cooperate to create new application of this kind.

GeneralRe: Live Update App @ PSC Pin
thomasdev29-May-05 3:08
Memberthomasdev29-May-05 3:08 
GeneralMicrosoft's Updater Application Block Pin
Anonymous25-May-05 11:41
MemberAnonymous25-May-05 11:41 
GeneralNice, but how to update the UpdateClient Pin
RSabet29-Nov-04 11:40
MemberRSabet29-Nov-04 11:40 
GeneralRe: Nice, but how to update the UpdateClient Pin
thomasdev29-Nov-04 11:56
Memberthomasdev29-Nov-04 11:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 26 Oct 2004


96 bookmarked