Search code examples
wix

Bundle installation requests unnecessary restart


I have upgraded an installation from WiX3 to Wix4.0.1. It contains 3 MsiPackage installer databases. If I install all three in a row, no restart is requested. But with the bundle I get the message "You must restart your computer before you can use the software" in the custom THM dialog.

How can I avoid this message? It is wrong, because the software can be used: all files are in place all registration values allow to use the .NET components with exposed COM interfaces. The message "you can use..." makes no sense at all after the uninstall operation.

Here is the bundle source code:

<?include FD_Defines.wxi?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
  <Bundle Name="ProductManagement" Version="$(var.CurrentVersion)" Manufacturer="ACME" UpgradeCode="my-GUID-is-here">    
    <BootstrapperApplication>
      <Payload SourceFile="Banner_small.jpg" />
      <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" />
    </BootstrapperApplication>

    <WixVariable Id="WixStdbaThemeXml" Value="HyperlinkTheme.xml" />
    <Variable Name="checkboxCrawler" Type="numeric" Value="0" />
   
    <Chain>
      <MsiPackage SourceFile="$(var.ProductManagementX86.TargetDir)ProductManagementX86.msi" InstallCondition="NOT VersionNT64 OR checkboxCrawler = 0" />
      <MsiPackage SourceFile="$(var.ProductCrawlerX86.TargetDir)ProductCrawlerX86.msi" InstallCondition="checkboxCrawler = 1" />
      <MsiPackage SourceFile="$(var.ProductManagementX64.TargetDir)ProductManagementX64.msi" InstallCondition="VersionNT64" />
    </Chain>

  </Bundle>
</Wix>

Some log files contain the word restart:

ProductManagementX64.msi

PROPERTY CHANGE: Adding MsiRestartManagerSessionKey property. Its value is 'b1c5274f2799dd4f9965645295e09921'.
RESTART MANAGER: Session opened.
RESTART MANAGER: Session closed.

ProductManagementX86.msi

PROPERTY CHANGE: Adding MsiRestartManagerSessionKey property. Its value is '6cb7f3141293e34c9eb68329a77f7304'.
RESTART MANAGER: Session opened.
RESTART MANAGER: Session closed.

Bundle.exe

Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{745E4313-4F19-4A02-9B6B-A24949300D5C}, resume: Active, restart initiated: No, disable resume: No
Applied execute package: ProductManagementX86.msi, result: 0x0, restart: None
Applied execute package: ProductManagementX64.msi, result: 0x0, restart: None
Unsetting variable 'WixStdBARestartRequired'
Apply complete, result: 0x0, restart: None, ba requested restart: No
Variable: WixCanRestart = 1
Exit code: 0x0, restarting: No

The log shows me no reason for the "restart necessary" message. How can I identify the reason of this message and suppress it?


Solution

  • Swap out your custom theme for one of the stock themes. If the message no longer appears, the problem is in your custom theme. If it keeps appearing, then Burn thinks a restart is required -- given your logging, I don't think that's what's happening.