I'm seeking advice on the common way that this sort of situatiton is handled. I have an application with 5 assemblies that is set out as follows:
- Windows
Service A
using sharedLibrary A
- Windows
UI App A
using sharedLibrary A
- Windows
Service B
usingLibrary B
One of the tasks Service B
performs is to check for updates, download and verify update files, and launch a utility updater.exe
(or whatever) that will perform the update.
The updater.exe
must be capable of updating all 5 assemblies at the same time. It should also be capable of performing the update whether or not the UI App
is running.
Since updater.exe
is launched by Service B
there is no issue with the updater connecting to the services, stopping them, and replacing the files before restarting them. Also, the updater can enumerate the running processes and replace the UI App
if it is not running. But since Library A
is shared it can only be replaced if the UI is not running.
How can I update the UI App
and Library A
, from a service-launched process, if the UI is running, including relaunch of the UI App if it the process is stopped or killed?
More generally, are there common/typical ways of doing this sort service + library + ui application update? I'm happy to reconsider my approach.
I should mention that the services have been written to be self-installed/uninstalled from command line.