I am building a .NET based windows service. Part of its functionality is supposed to be checking if a newer version of itself is available on a site. It is then supposed to download the new "package" and somehow upgrade itself. Anyone know of any libraries that can help with that? I am assuming I will run into issues of overwriting the executable that is currently running.
Asked
Active
Viewed 226 times
2 Answers
0
Put most of the functionality in a class assembly and load it dynamically using a common interfaces assembly to share types. When the service first starts check for a new version and overwrite the existing one before loading it dynamically.

kenny
- 21,522
- 8
- 49
- 87
0
If you want to get around the Vista UAC prompt you can have an admin service running on the local system acount and use this service to update the application.
- App checks for update and downloads it if required.
- If updates required run helper app (persists the permissions that the app was started with, if this is not an issue (e.g. don't mind app re-starting as admin) skip this step).
- Helper app calles admin service.
- Admin service stops app and updates it.
- Admin service calls helper app saying update complete.
- Helper app re-starts app.
We currently use this system on 2000, XP and Vista where users don't have to be administrators.

stevehipwell
- 56,138
- 6
- 44
- 61