I get error 2803: dialog view did not find a record for the dialog
. Its because I have explicitly removed the FilesInUse
dialog from my installer. This is a dialog that is sometimes requested for presentation by msiexec
when there are file locks. My installer logic does not explicitly ever try to show this dialog. My installer has custom actions to kill processes that are locking files, so there is never a problem with ignoring this message and then doing an installation (but for this process termination I need permissions, and thus a deferred custom action which must run after the dialog is requested). This dialog is essentially useless for all my intents and purposes. Instead of showing a fatal error dialog when this error code presents itself, how can I suppress this error code? Does anyone know if there any way to do that in WiX, perhaps through the form of a C# custom action or something? Any way to trap and handle error codes?

- 12,264
- 17
- 113
- 208
1 Answers
I don't think you can suppress that error, unless you are prepared to use your own UI and ignore FilesInUse dialog requests. Or modify the WiX code, if that's allowed. Basically you'd be receiving the messages and reacting (or not) to them:
https://msdn.microsoft.com/en-us/library/aa370573(v=vs.85).aspx
You'd return the ignore response instead of showing a dialog.
Can you use a bootstrapper that elevates when it starts and which runs the MSI? In that case the entire install is elevated and your CAs are elevated when they run before InstallFinalize, even if they are immediate.
If they are your apps, then another solution would be to integrate them with Restart Manager so that they are told to shut down, with the added feature that they can save state and restore it if necessary. You wouldn't need your CAs.

- 20,260
- 1
- 18
- 28
-
Your answer has been extremely helpful and I wanted to say thanks because you shed light on some great ideas that will benefit others who have the same problems. – Alexandru Apr 14 '15 at 18:04
-
I got around it, in the end, by continually prompting the user with a CA before InstallValidate which tells users to stop applications like Outlook, Excel, Word, etc. which host some of my installer's Office add-ins. Once these are down, I signal our tray application to shutdown. Because the process dies, `msiexec` to no longer shows the `FilesInUse` dialog. As an aside, I realized I didn't actually need to be elevated to do all of this. I was able to check registry keys through `RegistrySearch` tags in `Product.wxs`, and also check and terminate active processes as the current user. – Alexandru Apr 14 '15 at 18:12
-
If you ever get around to having the apps do this for themselves, look at the Restart Manager RegisterApplicationRestart () call. – PhilDW Apr 15 '15 at 17:52