Windows Service update which has a UI

Forgive me if this question has been asked before.

If I am updating a Windows Service, where the windows service also has an executable UI and I am using the AutomaticUpdaterBackend class. For example take FileZilla server, it has a windows service and it has a UI app which allows you to monitor the service. If the UI app is running, does the updater know that this file also needs to be updating so it kills the process or when the auBackend_ReadyToBeInstalled(object sender, EventArgs e) is run in my windows service code should I look for this process and kill it myself in by writing some code to search out this process and kill it?

Hey David,

If the UI app is running, does the updater know that this file also needs to be updating so it kills the process or when the auBackend_ReadyToBeInstalled(object sender, EventArgs e) is run in my windows service code should I look for this process and kill it myself in by writing some code to search out this process and kill it?

wyUpdate knows the file needs to be closed, but it doesn't forcefully close it. When wyUpdate is in "service updating mode" it only waits 20 seconds, and if all your running exes are still not closed wyUpdate restarts your service with an error.

You must close the UI part of the program before updating. You can do this a few ways. For instance you can forcefully kill all open UI instances. Another option is to gracefully communicate to the UI instances via IPC and wait until the user has closed the UI apps before continuing.

Thanks Sam, I'll try and be graceful and use IPC, Ill check out Wyatt's blog post on this 😀