windows automatic software updates

2019-01-30 20:11发布

What are some good solutions for handling automatic web based software updates for windows forms projects? I am aware of microsoft one-click, but am not interested in it at this time.

8条回答
\"骚年 ilove
2楼-- · 2019-01-30 20:47

Here's an open-source solution I wrote to address specific needs we had for WinForms and WPF apps. The general idea is to have the greatest flexibility, at the lowest overhead possible.

So, integration is super-easy, and the library does pretty much everything for you, including synchronizing operations. It is also highly flexible, and lets you determine what tasks to execute and on what conditions - you make the rules (or use some that are there already). Last by not least is the support for any updates source (web, BitTorrent, etc) and any feed format - whatever is not implemented you can just write for yourself.

Cold updates (requiring an application restart) is also supported, and done automatically unless "hot-swap" is specified for the task.

This boild down to one DLL, less than 70kb in size.

More details at http://www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/

Code is at http://github.com/synhershko/NAppUpdate (Licensed under the Apache 2.0 license)

查看更多
forever°为你锁心
3楼-- · 2019-01-30 20:48

it really depends on how complex of an update process is needed.

I have had a few clients with simple needs where we created our own process setup that handled it, in about 3 hours of development we have a fully working solution that met all of their needs.

查看更多
再贱就再见
4楼-- · 2019-01-30 20:53

ClickOnce is good for cookie cutter stuff, but has some limitations around security (i.e. can't create a desktop icon, no access to COM, etc)

Assuming you are using MSI to install your application. Use WIX (http://wix.sourceforge.net/) to create a patch (.msp). You will want to look into Least Privileged User Account (LUA) Patching for Vista as UAC will screw you if you don't.

Then your application does the follows:

  1. Check for a new version via HTTP
  2. Download the MSP (be careful of where you DL it to in Vista because of UAC)
  3. Start a Shim exe that
  4. waits for your app to close
  5. launches the msp (in non-interactive mode)
  6. restarts your app

This can all happen automatically behind the scenes with zero user interaction on both XP and Vista.

A good place to start with this, and with WIX in general is:

http://www.tramontana.co.hu/wix/index.php (Lesson 4 is on Updates)

查看更多
你好瞎i
5楼-- · 2019-01-30 20:56

I've also heard it called clicktwice :+> The WIX solution is more what I was interested in. Are there any sample applications (with source) for using this technique?

查看更多
We Are One
6楼-- · 2019-01-30 20:58

Not to get too spammy, but our company offers an automatic updating solution. It comes in 3 parts:

wyUpdate handles all of the Vista/Windows 7 UAC problems and all the file permission problems that inevitably pop up when you're trying to update complex software.

查看更多
混吃等死
7楼-- · 2019-01-30 20:59

We wrote our own at one time... That wasn't a good idea. In many cases you can use ClickOnce. We actually use a product called AutoUpdate+ which we can recommend. Its particularly special feature is that it can avoid UAC popup issues.

查看更多
登录 后发表回答