views:

49

answers:

3

I would like to make my windows form app self updating when it starts. Where can I find good information for that?

I am using Visual Studio 2008 VB.NET.


I like the click once approach. With this application I have an access db as the backend datastore. When the application self updates how can I be sure the mdb file is not overwritten?

What is the best way to self upgrade the mdb if their is a change to the mdb file but not loose the data?

+3  A: 

If you deploy using ClickOnce, you get this functionality for free. I do not have any experience with this (yet), but I can point you to an article.

Thomas
A: 

I have been using Click Once for years with very little problems.

Brian Spencer
A: 

I've written a custom automatic updater and basically, the way it works is this:

The whole application is essentially 3 parts:

  1. A launcher .exe that's essentially like a bootstrapper
  2. The launcher .exe has an embedded .exe resource that is used if the launcher .exe itself needs to be updated
  3. The application dll's

When you start the application, the launcher app starts and checks via webservices if the dll's are up to date. If they are not, it downloads them to a temporary directory and then makes sure the checksums are all correct and overwrites the existing app libraries with the new ones. It's then loading the application's core assembly and calls a "Run" method via reflection.

Now, in our app we sometimes have the need to update the launcher itself and the way we achieved this is by embedding an .exe in the launcher .exe resources. If the launcher detects that there is a new launcher .exe available, it downloads it to a temp directory, then extracts the .exe and launches it. This extracted .exe simply shuts down the launcher process, copies the new launcher .exe over the old one and then starts the launcher process again.

Tom Frey