WIX Bootstrapper-卸载使用实例转换的MSI

时间:2019-06-21 00:27:43

标签: wix windows-installer msiexec wix3

我需要安装捆绑多个MSI的引导程序的多个实例。需要安装引导程序和MSI的多个实例。我可以找到安装,但是我还没有弄清楚如何在卸载MSI安装实例的情况下进行卸载。

在我的测试中,我对引导程序进行了硬编码,以在MSI I12 中使用转换。效果很好...但是不能与boostrapper卸载一起卸载。日志文件显示MSI状态为“不存在”。

我的捆绑包是:

<?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>

我将“可见”设置为“是”,以便在调试时可以看到它。

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>

我错过了什么?

1 个答案:

答案 0 :(得分:0)

刻录不支持实例转换。