user57508
user57508

Reputation:

Why does Bootstrapper hang when detecting FilesInUse?

I am using WiX Toolset v3.10.0.1726

I have a .msi-file that gets bundled within a bootstrapper.

MSI Defintion:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*"
           Name="$(var.ProductName)"
           Language="!(loc.ProductLanguage)"
           Version="!(bind.fileVersion.FILE)"
           Manufacturer="$(var.Manufacturer)"
           UpgradeCode="$(var.UpgradeCode)">
    <Package InstallerVersion="200"
             Compressed="yes"
             InstallScope="perMachine"
             Platform="x86"
             InstallPrivileges="elevated"
             ReadOnly="yes" />
    <MediaTemplate EmbedCab="yes" />

    <?include Feature.wxi?>

    <MajorUpgrade AllowDowngrades="no"
                  AllowSameVersionUpgrades="yes"
                  DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />

    <UI Id="UserInterface">
      <Property Id="WIXUI_INSTALLDIR"
                Value="TARGETDIR" />
      <Property Id="WixUI_Mode"
                Value="Custom" />

      <TextStyle Id="WixUI_Font_Normal"
                 FaceName="Tahoma"
                 Size="8" />
      <TextStyle Id="WixUI_Font_Bigger"
                 FaceName="Tahoma"
                 Size="9"
                 Bold="yes" />
      <TextStyle Id="WixUI_Font_Title"
                 FaceName="Tahoma"
                 Size="9"
                 Bold="yes" />

      <Property Id="DefaultUIFont"
                Value="WixUI_Font_Normal" />

      <DialogRef Id="ProgressDlg" />
      <DialogRef Id="ErrorDlg" />
      <DialogRef Id="FilesInUse" />
      <DialogRef Id="FatalError" />
      <DialogRef Id="UserExit" />

      <Publish Dialog="ProgressDlg"
               Control="Next"
               Event="EndDialog"
               Value="Return"
               Order="2" />
    </UI>
  </Product>
</Wix>

If executing the .msi-file directly, FilesInUse dialog shows up correctly if the application is running. Everything is working fine.

Now I've integrated the .msi-file in a bootstrapper:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle Name="!(bind.packageName.Setup)"
          Version="!(bind.packageVersion.Setup)"
          Manufacturer="!(bind.packageManufacturer.Setup)"
          UpgradeCode="$(var.UpgradeCode)"
          DisableModify="yes">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
      <bal:WixStandardBootstrapperApplication LicenseUrl=""
                                              SuppressOptionsUI="no"
                                              ShowVersion="yes"
                                              SuppressRepair="yes"
                                              LogoFile="Resources/dpd.png" />
    </BootstrapperApplicationRef>
    <Chain DisableSystemRestore="yes">
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  Name="$(var.ProductName)"
                  SourceFile="setup.msi"
                  DisplayInternalUI="yes"
                  Vital="yes" />
    </Chain>
  </Bundle>
</Wix>

I need DisplayInternalUI as I am having some extra dialogs in the .msi-file which are mandatory for the setup.

If the application is not running in an upgrade scenario everything is working fine, whereas a running application while upgrading brings the bootstrapper and the .msi-file into a not responding state.

The output of the log:

[2A34:28F0][2015-07-21T16:38:40]i001: Burn v3.10.0.1726, Windows v6.1 (Build 7601: Service Pack 1), path: W:\work\SETUP.exe
...
[2A34:28F0][2015-07-21T16:38:40]i009: Command Line: '-burn.unelevated BurnPipe.{571E9E94-4908-45EE-A6AC-05F923FAFDCF} {F7B2FBA0-BAEB-42C7-B1D5-B8704F153049} 10904 /log log.txt'
...
[2A34:28F0][2015-07-21T16:38:41]i300: Apply begin
...
[2A98:054C][2015-07-21T16:38:42]i301: Applying execute package: Setup, action: Install, path: C:\ProgramData\Package Cache{99D06386-9447-4D7B-8307-E53C12BB09B5}v2.0.19.28124\FOOAPPLICATION, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLFOLDER="C:\FOOFOLDER" TRANSFORMS=":1031"'

And the output of the msi-log (at least the last relevant lines):

...
MSI (s) (24:D4) [16:38:42:826]: Doing action: InstallValidate
MSI (s) (24:D4) [16:38:42:827]: PROPERTY CHANGE: Deleting MsiRestartManagerSessionKey property. Its current value is '053651647df31e46971d3237c9eb6a06'.
MSI (s) (24:D4) [16:38:42:827]: Transforming table Dialog.
...
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: BindImage
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: ProgId
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: PublishComponent
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: SelfReg
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: Extension
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: Font
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: Class
MSI (s) (24:D4) [16:38:42:828]: Note: 1: 2205 2: 3: TypeLib
MSI (s) (24:D4) [16:38:42:829]: Note: 1: 2205 2: 3: _RemoveFilePath
MSI (s) (24:D4) [16:38:42:993]: Note: 1: 1402 2: HKEY_CLASSES_ROOT.NET 3: 2
MSI (s) (24:D4) [16:38:43:127]: Note: 1: 1402 2: HKEY_CLASSES_ROOT.NET 3: 2
MSI (s) (24:D4) [16:38:43:221]: PROPERTY CHANGE: Modifying CostingComplete property. Its current value is '0'. Its new value: '1'.
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: BindImage
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: ProgId
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: PublishComponent
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: SelfReg
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: Extension
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: Font
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: Class
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2205 2: 3: TypeLib
MSI (s) (24:D4) [16:38:43:222]: Note: 1: 2727 2:
MSI (s) (24:D4) [16:38:43:314]: Transforming table Error.

MSI (s) (24:D4) [16:38:43:314]: Transforming table Error.

MSI (c) (98:4C) [16:38:43:326]: RESTART MANAGER: Session opened.

So, why does the msi in the bootstrapped scenario hang (and causes the bootstrapper to hang either), and how do I fix this?

Upvotes: 0

Views: 482

Answers (1)

0xDEADBEEF
0xDEADBEEF

Reputation: 1

You skip the creation of a system restore point due to the DisableSystemRestore value on your chain but you did not do a similar thing in your msi. You can skip the creation of restore points in your msi by setting the MSIFASTINSTALL property. Works with MSI 5.0 as described here: http://msdn.microsoft.com/en-us/library/dd408005(VS.85).aspx

<!-- Add me to your MSI definition -->
<Property Id="MSIFASTINSTALL" Value="1" />

Upvotes: 0

Related Questions