How to avoid "The following applications should be closed" message during uninstallation with WIX?

windows, windows-installer, wix

Solution

You've disabled the Restart Manager interaction with the Windows Installer so now the Windows Installer is falling back to its old behavior, FileInUse dialog. This behavior is documented with MSIRESTARTMANAGERCONTROL Property.

I've never tried but theory has it that you can make your FilesInUse dialog hidden (`Dialog/@Hidden='yes'`) to cause the dialog to not be shown.

Problem

I try to write an MSI installer using WIX. During uninstallation I need to run a specialized custom action that first stops my services and then closes the application. I do that after `InstallInitialize` event using the following mark-up: ``` <CustomAction Id='myCustomAction' BinaryKey='myDll' DllEntry='msiUninstallInitialize' Execute='deferred' Impersonate='no' /> <InstallExecuteSequence> <Custom Action='myCustomAction' After='InstallInitialize'></Custom> </InstallExecuteSequence> ``` The issue is that if a previous version of my application was running before I try to upgrade to a newer one using my MSI, I was getting a Restart Manager popping up this message: and then this one: To stop it from doing it, I added the following property: ``` <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" /> ``` But now the uninstaller shows this window: So I was curious, is there any way to disable checks if my app is running (I will close it myself during my custom action processing)?

Original source