MsiRMFilesInUse? - Advanced Installer Community
GeorgeNJ
Posts: 20
Joined: Wed Mar 13, 2013 10:15 pm

MsiRMFilesInUse?

In my install package quite often during update or uninstall "Automatically close applications and attempt to restart them after setup is complete" fails.

Is there a way to detect the result from the MsiRMFilesInUse dialog when "Automatically close" fails to close any running app in my package? On failure I'd like to trigger a custom action to close any running app.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: MsiRMFilesInUse?

Hello,

This dialog ("FilesInUse" on XP and "MsiRMFilesInUse" on Vista) is shown automatically by Windows Installer during the InstallValidate standard action when the installer checks if any file is in use and if so, it displays that dialog.

This dialog can be avoided by running a Detect and Stop custom actions before the install/uninstall process which stops the processes which use the files.
Please take a look on the Detect or stop a process How-to article which may be useful to you.

Also, you can take a look on our How is Files in Use determined - can it be overridden? forum thread which debates a similar subject.

Please let us know if that helped, otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GeorgeNJ
Posts: 20
Joined: Wed Mar 13, 2013 10:15 pm

Re: MsiRMFilesInUse?

Thanks Dan, I've read those links you provided.

I was asking if there was a way to run my custom action after the MsiRMFilesInUse dialog is displayed but before the "couldn't close files in use" message box is displayed. I'm guessing not since it is handled internally by Windows Installer.

I tried using detect/stop custom actions but I couldn't seem to close more than one process using more than one detect/stop action. (Most likely pilot error on my part.) Is it possible to close multiple process using detect and stop?

My custom action closes any running process in my install package before the MsiRMFilesInUse dialog appears. The folks who distribute this package are concerned that my custom action may trigger a malicious software warning from a users AV software. The custom action is code signed. Should this be a concern?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: MsiRMFilesInUse?

Hello,
I was asking if there was a way to run my custom action after the MsiRMFilesInUse dialog is displayed but before the "couldn't close files in use" message box is displayed. I'm guessing not since it is handled internally by Windows Installer
This dialog ("FilesInUse" on XP and "MsiRMFilesInUse" on Vista) is shown automatically by Windows Installer during the InstallValidate standard action when the installer checks if any file is in use and if so, it displays that dialog.
You need to make sure that the related files are not in use before the InstallValidate standard action in order to avoid that dialog.
I tried using detect/stop custom actions but I couldn't seem to close more than one process using more than one detect/stop action. (Most likely pilot error on my part.) Is it possible to close multiple process using detect and stop?
Please take a look on the Tutorial: Detecting and stopping multiple processes forum thread which debates a similar subject.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
GeorgeNJ
Posts: 20
Joined: Wed Mar 13, 2013 10:15 pm

Re: MsiRMFilesInUse?

The "stopping multiple processes" thread was handy but not adequate. I have one potentially running app that only appears as an icon in the notification area whose Window style is WS_EX_TOOLWINDOW | WS_EX_TOPMOST. The "close application" custom action fails to close this app (has no window but has a message pump/responds to messages.). Terminating leaves this app's icon. Closing, if it worked, would allow the app to cleanup.

Anyway thanks for your excellent support, Dan!

Return to “Common Problems”