views:

255

answers:

4

I need to install some .NET software on several PC's.

This software needs to check each time it is restarted to see if a newer version exists on the server.

The end users will have basic user rights and therefore cannot copy files to the 'Program Files' directory.

If a newer version exists, the application closes, an updater program copies the file from the server, then it restarts the application.

However, I wanted to build my updater so it would be application independant. IE: I'd send an id to the updater to tell it which application to update.

Then I wanted to make it still work if the file server name was changed.

I think I can do all this using a service, with admin rights, to copy the files.

  1. Is there a class that does this kind of thing already?
  2. Am I on the right track when I am thinking of using an installed service?
+1  A: 

The Application Updater Block has worked for me.

Geoffrey Chetwood
+7  A: 

The .NET Framework has a built-in feature called clickonce, that does precisely what you want.

Mike Brown
I agree click once is exactly what you need.
Omar Kooheji
+2  A: 

Look at ClickOnce deployment. It covers just about everything you asked for. It doesn't do the update app by ID thing, but it does make sure each app is update to date without you having to write any update code per app. And it won't automatically handle file-server name changes, but you can point your links around as needed.

Joel Coehoorn
ha ha...beat you for once :P
Mike Brown
A: 

1) Depends on the .NET version you're using. >=2.0 You can deploy smart apps which can check a network path for an updated version, then it will update if necessary.

2) If you're stuck at 1.1 (Like me :-( ), either a service or a scheduled task that runs on login will work just fine, that's what we do here. We keep a few DB tables that track who has the most recent version of what.

-Ian

Ian Jacobs