开发者

I am looking for information to make my windows form app self updating

开发者 https://www.devze.com 2022-12-24 03:56 出处:网络
I would like to make my windows form app self updating when it starts.Where can I 开发者_如何学Pythonfind good information for that?

I would like to make my windows form app self updating when it starts. Where can I 开发者_如何学Pythonfind 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?


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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消