views:

844

answers:

8

I want to implement an "automatic update" system for a windows application. Right now I'm semi-manually creating an "appcast" which my program checks, and notifies the user that a new version is available. (I'm using NSIS for my installers).

Is there software that I can use that will handle the "automatic" part of the updates, perhaps similar to Sparkle on the mac? Any issues/pitfalls that I should be aware of?

+1  A: 

If your application is written in .Net, you could try ClickOnce. However, it's difficult to perform administrative or custom actions during install using this approach.

tbreffni
+3  A: 

For .NET, a while back Microsoft Patterns + Practices published the Application Updater Block. This was (to my mind) rather overblown and over-engineered, but did the job quite well.

In essence it used a "stub loader" to check a manifest and a Web service to see if a later version of the program than the one installed was available, then used the BITS background downloader technology to download a new version if one was available on the server.

Once the new version was downloaded and installed (with .NET this is as simple as an xcopy to the relevant folder), the application would update the manifest. The next time the program was loaded the new version would be launched.

While the Patterns + Practices code is .NET specific, there's nothing there that couldn't be copied for a non-.NET application, especially if you have the ability to silently run the install process in the background.

Jeremy McGee
+3  A: 

There is no solution quite as smooth as Sparkle (that I know of).

If you need an easy means of deployment and updating applications, ClickOnce is an option. Unfortunately, it's inflexible (e.g., no per-machine installation instead of per-user), opaque (you have very little influence and clarity and control over how its deployment actually works) and non-standard (the paths it stores the installed app in are unlike anything else on Windows).

Much closer to what you're asking would be ClickThrough, a side project of WiX, but I'm not sure it's still in development (if it is, they should be clearer about that…) — and it would use MSI in any case, not NSIS.

You're likely best off rolling something on your own. I'd love to see a Sparkle-like project for Windows, but nobody seems to have given it a shot thus far.

Sören Kuklau
"ClickThrough has significant bugs that have all been punted to WiX v4 essentially rendering ClickThrough useless until then."Source: https://sourceforge.net/mailarchive/message.php?msg_id=DE33023B477FE44EAA71983F5279F6CE500338B5BD%40NA-EXMSG-C102.redmond.corp.microsoft.com
KevinT
+3  A: 

I asked a similar question. Follow the link to see the responses. http://stackoverflow.com/questions/46013/self-updating

Mike
A: 

Just came here from an answer to my own question on the same subject - I mention one other updating solution in my question. It uses a stub loader, and an xml file to point to the latest executable.

Dave Arkell
+4  A: 

There's now a Windows port of Sparkle, see http://winsparkle.org.

vslavik
Another one is SparkleDotNet at http://bitbucket.org/ikenndac/sparkledotnet/wiki/Home
TomA
+2  A: 

It's a good idea to use a third-party solution, cause autoupdates can be a pain, especially with Windows Vista/7 (UAC). For what it's worth, the product my company uses is AutoUpdate+ and it seems to work fairly well.

LoneRanger
A: 

Google Chrome auto-update is based on Omaha:

http://code.google.com/p/omaha/

Their overview has a great section on why it was needed:

The browser typically prompted the user with a long series of techy, confusing and scary dialogs all trying to convince the user not to install. Then the user was prompted with a wizard filled with choices that they did not need to or know how to decide amongst. These factors combined to form a bad user experience and large drop-off during the app installation process

Mark