Reputation: 3534
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?
Upvotes: 1
Views: 612
Reputation: 751
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.
Upvotes: 1