1

I've created a WIX Bootstrapper application that installs two MSI packages. One of which is a simple application that can be installed by just closing an already running instance and without reboot. The other package installs a library to be used by the Windows Explorer and should always requires a reboot.

Thus, what i'd like to have is the files in use dialog to be shown if the simple application is updated (and currently running of course) and require a reboot (and not show the files in use dialog) when the Explorer library is updated.

I tried setting <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/> in the MSI Installer project that installs the Explorer library but that had no effect.

I also tried using RegistrySearch in the bootstrapper application to determine whether or not the Explorer library is going to be updated and then to set ShowFilesInUse in WixStandardBootstrapperApplication to "yes" or "no" accordingly, but unfortunately I cannot provide a variable as value.

So all i can achieve is to either always show the files in use dialog for both MSI packages or not to show it at all and always require a reboot. The only other option I can think of, is maybe to wrap the MSI Bundle that installs the Explorer library into another bootstrapper application and set ShowFilesInUse="no" there, but that seems a bit cumbersome... Is there maybe another option to achieve this?

Jan Gassen
  • 3,406
  • 2
  • 26
  • 44
  • Just for clarification: You are looking to have MSI#1 show the files in use dialog if files are actually in use. You are looking for MSI#2 to force a reboot if the Explorer library is updated. And these two actions are not conditional upon each other, correct? – philselmer Aug 28 '17 at 13:18
  • That is exactly what i'm looking for, correct. – Jan Gassen Aug 28 '17 at 14:15
  • 1
    Try using the value DisableShutdown for MSI#1, which will still show the files in use dialog, but prevent the Restart Manager from being involved. My thought is that preventing RM from being used in the first MSI may allow the second MSI to successfully disable it (vith the value Disable). – philselmer Aug 28 '17 at 14:41
  • That worked perfectly, thanks a lot! I'd be happy to accept this as the correct answer ;) – Jan Gassen Aug 28 '17 at 16:28
  • I'm very glad to have helped :) – philselmer Aug 28 '17 at 19:03

1 Answers1

1

Add <Property Id="MSIRESTARTMANAGERCONTROL" Value="DisableShutdown"/> to your first MSI. This will disable the Restart Manager but still allow the Files In Use dialog to operate. Keep using <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/> in the second MSI. It seems that once RM is enabled during an installation, it will ignore other commands to disable.

philselmer
  • 751
  • 4
  • 22