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
Shay's answer is correct. Recent versions of Windows Installer just behave this way. Windows Installer goes to a lot of trouble to make sure that you can avoid a reboot at uninstall time by re-mapping in-use Dlls etc. In general, a running app can continue running after uninstall, and some cleanup will occur when the app shuts down, the rest after the next reboot. The point is that if Windows Installer can move the in-use binaries to another location, keep any apps running, and replace the ones that were in use (but memory backing remapped) and all that's required is deleting a bit of non-essential junk at the next reboot then why force a reboot? There is no need to show a files-in-use dialog, so that situation doesn't arise.
This can cause issues if the app tries to access a file that's been uninstalled, but I assume that risk is seen as low. If the app needs to know that an uninstall is going on then intergrating with Restart Manager should work - Windows will tell it there's an uninstall going on. Otherwise again, Shay is correct. Write an uninstall custom action if necessary to tell the app to close down.