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.
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
- Should I use static function in c# where many call
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)
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.
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:
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'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?
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.
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.