Self updating applications

  • Thread starter Thread starter Marco Castro
  • Start date Start date
M

Marco Castro

Is there someway to get an application to update itself? Right now I'm
including a second executable that the main application calls whenever it
sees a new version of itself. This works but it doesn't seem like a very
clean way to do it so I'm just wondering how everyone else handles it.

Marco
 
Only works on 2000+ I believe....

BITS API isn't supported on NT (which is sadly why I couldn't use this!
argh!)
 
Sadly most of the machines where I work are using Windows 98 so I can't use
this. But from what I read it doesn't seem to be all that different from
what I'm doing now. Thanks for the help anyways.
 
Marco Castro said:
Is there someway to get an application to update itself? Right now I'm
including a second executable that the main application calls whenever it
sees a new version of itself. This works but it doesn't seem like a very
clean way to do it so I'm just wondering how everyone else handles it.

Marco
I have been using a simple system in our office for years. This is simply to
build a small "Launch" application. Basically what this app does is check to
see if any newer versions of software are available and copy them over
existing before loading the main app. This only takes a couple of seconds
and the users don't even notice.
 
Thats how the app updater works.. but uses BITS...
I read the article on the app updater. It mentions BITS as a service of
Windows, but the article goes on to say:

"A service was *not* used in the .Net Application Updater component so that
it would work on the Windows (x operating systems which do not support
system services."

Based on that, it should work correctly on Win 9x
 
Here's what I do.

1) Cross-reference the version number of the application being launched with the latest release version number. I simply store the latest version number in an SQL table on my data server. I also use this routine to test my network / database connectivity (has to be done anyway).
2) Ensure only a single instance of the application can be launched.
3) If the application being launched does not have a version equal to the value stored in the SQL table, then I show a messagebox that indicates to the user that an update is available and will be installed.
4) I then launch a new process and run the setup installer file stored on a network server and immediately shut down the running app. Sure the user goes through a few clicks to install the new version, but it only takes a few seconds.

This might not be the most invisible way to do things, but it works. You will obviously have to ensure that the setup and deployment project property settings are correct to ensure that the existing app is first removed before the new version is installed.
 
It has the *ability* to do so, but you have to implement your own
IDownloader interface I thought. The one it came with I thought was a BITS
implementation.

Then again, I think there are like 3 major ".NET Application Updaters" in
existance so I could be thinking of a different one...


Got a link?
 
Back
Top