views:

214

answers:

2

Environment:

  • .NET
  • c#
  • VS2005 and
  • some 3rd party components
  • .vdproj files (setup projects inside VS 2005) for .msi building - not "one click deployment"

Problem

I am in a project phase where there are several updates to the project during a day. Since every change is small (two assemblies at most), it would be convenient for the user to use some kind of automatic update that will be both fast and worry-free.

Proposition

I would like to do a simple system that would store my app files somewhere on my server, along with some xml file that will list them with their hashes. Desktop app will read xml, compare hashes, download the required files, restart the app and user would have new version without even noticing it.

So my thought go further...

Client app for it: simple, day or two of work. Considerations:

  • have to take care of permissions to write files to user program directory (actually I'm helpless if I can't)
  • have to launch updater process that will download and replace files and relaunch original app
  • have to make local xml file with hashes at first run, and for that I need local list of deployed files that could change (since all of them aren't just in the local app folder)

Server side is trivial, but there are also some considerations:

  • root file with current version description, file list and hashes
  • manually upload files to server, create tool for hashing files

Now the question: is there some tool that follows my train of thought to do that without much hassle from the side?

+4  A: 

What you describe sounds a lot like ClickOnce. Yes: I noticed that your wrote that the application is installed via MSI, and that's fine.

ClickOnce is more than just initial installation. There are many options, and you can set it up so that it checks for updates even if the application is already running, and there's also an API that you can use if the declarative approach isn't flexible enough for you.

Mark Seemann
agree: it sounds like mosmondor is rewriting clickonce. Is there a feature of MSI that you're depending on that can't be replicated in clickonce?
Rob Fonseca-Ensor
I was a bit cautious around ClickOnce but I have to say it works as advertised and is really straight forward to set up.
Rob Allen
There was something that averted me from using ClickOnce. I had a feeling that it's a great idea, but wasn't polished and will be abandoned like some M$ inventions...
Daniel Mošmondor
@mosmondor: I have no idea if what you say is true or not, but even *if* it's true, 'abandonment' in the .NET framework means that it will not be further developed - there will still be 10 years support on it. I don't know what you are capable of, but I'm pretty certain ClickOnce is better and more robust than anything I could develop singlehandedly in a week or two :)
Mark Seemann
@mark: any code that is developed is worth using. Years of developing taught me so. Even if code is from Microsoft :)
Daniel Mošmondor