2

I have a need to install multiple instances of a bootstrapper that bundles multiple MSIs. The need is to installer multiple instances of both the bootstrapper and the MSIs. I can do the install find but I've not worked out how to uninstall with the MSI install instance uninstalled.

In my test, I hard code the bootstrapper to use a transform in the MSI I12. Works well ... but it does not uninstall with the boostrapper uninstall. The log file says the MSI status is "absent".

My bundles is:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Test Bootstrapper1" Version="1.0.3.0" 
      Manufacturer="XXXX Pty Ltd" 
      UpgradeCode="d212d3ae-aa3f-54e6-be0e-4038a69670cf">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />

    <Chain>
  <MsiPackage SourceFile=".\..\Output\SetupProject1.msi"
              Id="Msi01"
              Vital="yes"
              Permanent="no"
              Visible="yes">
    <MsiProperty Name="TRANSFORMS" Value=":I12"/>
    <MsiProperty Name="MSINEWINSTANCE" Value="1"/>
  </MsiPackage>
    </Chain>
</Bundle>

I set Visible to 'yes' so I could see it while debugging.

The MSI:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Test SetupProject1" 
       Language="1033" Version="1.0.3.0" 
       Manufacturer="XXXX" 
       UpgradeCode="354abf0b-219c-4bd4-ad46-9b4f6204c97a">

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

<Property Id="INSTANCEID" Value="0" />

<InstanceTransforms Property="INSTANCEID">
  <Instance Id="I11" ProductCode="0000000B-0003-53E1-924A-FA017B1EE822" UpgradeCode="0000000B-B369-43E1-914A-FA017B1EE822" ProductName="Test SetupProject1 I11" />
  <Instance Id="I12" ProductCode="0000000C-0003-53E1-924A-FA017B1EE822" UpgradeCode="0000000C-B369-43E1-914A-FA017B1EE822" ProductName="Test SetupProject1 I12" />
  <Instance Id="I13" ProductCode="0000000D-0003-53E1-924A-FA017B1EE822" UpgradeCode="0000000D-B369-43E1-914A-FA017B1EE822" ProductName="Test SetupProject1 I13" />
  <Instance Id="I14" ProductCode="0000000E-0003-53E1-924A-FA017B1EE822" UpgradeCode="0000000E-B369-43E1-914A-FA017B1EE822" ProductName="Test SetupProject1 I14" />
</InstanceTransforms>

    <Feature Id="ProductFeature" Title="SetupProject1" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="SetupProject1" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
        <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
        <Component Id="ProductComponent">
    <File Source="TextFile1.txt" />
        </Component>
    </ComponentGroup>
</Fragment>

What have I missed?

Rob Smyth
  • 1,708
  • 10
  • 17
  • Can't look at this right now, but some links for you (might not help much, but all I have time for right now): [Installing Multiple Instances by different msi having same Package Code](https://stackoverflow.com/questions/51650897/installing-multiple-instances-by-different-msi-having-same-package-code/51661060#51661060) (newer). [I want to install an MSI twice](https://serverfault.com/questions/54386/i-want-to-install-an-msi-twice/66999#66999) (old). [Multiple instances and patches](http://sklyarenko.net/blog/2011/09/14/revisited-multiple-instance/). – Stein Åsmul Jun 21 '19 at 01:59
  • [Finding product code of installed MSI](https://stackoverflow.com/a/29937569/129130) (the VBScript down the page should give you a quick list of installed products - straight from the Windows Installer database via proper APIs) and [Uninstalling an MSI without using msiexec.exe](https://stackoverflow.com/a/1055933/129130). – Stein Åsmul Jun 21 '19 at 02:00

1 Answers1

0

Burn doesn't support instance transforms.

Bob Arnson
  • 19,440
  • 2
  • 37
  • 45