I am using Windows Installer XML 3.0 (WIX3) to install some software.
Everything works fine, however, I'm having a really hard time to handle the following use case: the installed software is still running, when the user tries to uninstall it. The default behavior seems to remove all files but lets the application running (which is hard to see in my case, because it's sitting in the task tray).
I added the following code in my installer.wxs
file:
<InstallExecuteSequence>
<Custom Action="WixCloseApplications" Before="RemoveFiles" />
</InstallExecuteSequence>
<util:CloseApplication Id="CloseFoobar"
CloseMessage="no"
Description="FooBar is still running!"
ElevatedCloseMessage="no"
RebootPrompt="no"
Target="foobar.exe" />
But this doesn't work - even worse, it shows a dialog that asks for a reboot during install!
What would be the correct way to do it?