views:

37

answers:

3

I have an app that runs as a service, and I'd like it to be able to check a URL to see if a new version is available, and if so to download and install it. I can manually hack something together, but would be great if I could create an MSI package to update the service, and any other components that are part of my distribution. I'd also like it to be done without any UI, so the user is unaware of the update.

Are there any good solutions for this?

+2  A: 

This could be tricky depending on what your update might want to do.

If you intend on deleting and re-installing the service, this may require a reboot, which will certainly be visible to the user.

In order to replace the components of the service, the service has to be stopped first. If your service itself is detecting the update availability, it may have to kick off another process to stop the service, run the installer/updater and then restart the service.

Bill
Yeah, I know I can write a program to do the update, probably with a second service. I was hoping there was a more formal way of doing it, like by building something into the installer package.
Mike Pateras
+2  A: 

Try installer.codeeffects.com. It has this feature.

Regina
Sorry, I just checked and found out that I was only partially correct :) They have something similar but your users still need to reinstall manually.
Regina
+1  A: 

You could try MEF (http://www.codeplex.com/MEF) and use

[Import("http://someUrl/someComponent")]
public ISomeComponent SomeService;

Its not actually an auto update, but the service could be always up to date. I am not sure if it works.. its just an idea :-)

Robert