WIX burn bundle-不删除旧版本

WIX burn bundle-不删除旧版本,wix,windows-installer,burn,Wix,Windows Installer,Burn,我目前正在为我们的“AwesomeApp”创建一个设置,我将在下文中称之为“MSI”。我在这里遇到的问题是: <Chain> <!--<PackageGroupRef Id="NetFx40Web" /> <RollbackBoundary />--> <!-- referencing other projects and using variables see: http://wixt

我目前正在为我们的“AwesomeApp”创建一个设置,我将在下文中称之为“MSI”。我在这里遇到的问题是:

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
我的MSI有它自己的升级代码和版本,当我启动它并运行MSI时,旧版本就会按照它应该的方式被删除。(我现在只做主要升级) 然而,当我运行引导程序时(当然我也提高了引导程序的版本号,它有自己的升级代码,永远不会改变),我在ARP中得到了两个安装和两个条目:一个用于旧版本,一个用于新版本的MSI

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
我到底做错了什么?这真让我抓狂

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
以下是msi xml:

<?xml version="1.0" encoding="UTF-8"?>
  <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?define Source = "..\" ?>
  <?define Binaries = "..\AwesomeApp\bin\Release" ?>
  <?define AppName = "AwesomeApp" ?>
  <?define AppDataFolderName = "AwesomeApp" ?>
  <?define version = "0.6.0.0" ?>
  <?define upgradeCode = "801e999b-8edc-47a4-9793-78273739aa7d"?>

  <Product Id="*" Name="AwesomeApp" Language="1033"  Version="$(var.version)" Manufacturer="AwesomeCorp" 
           UpgradeCode="$(var.upgradeCode)">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
        <MediaTemplate EmbedCab="yes" />

    <MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="no" DowngradeErrorMessage="A newer version of this product was found." />

    <Feature Id="ProductFeature" Title="$(var.AppName)" Level="1">
            <ComponentGroupRef Id="ProductComponents" />
        </Feature>

    <Icon Id="my.ico" SourceFile="my.ico" />

    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
    <UIRef Id="WixUI_InstallDir" />

    </Product>

    <!-- Fragment stuff omitted for clarity -->
</Wix>
        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>

据我所知,日志中没有检测到现有的msi,因此执行了一个干净的安装,因此ARP中有两个条目。但这怎么可能呢?

日志中的行:

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
[183C:26FC][2013-12-24T08:46:10]i301: Applying execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, action: Uninstall, path: C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe, arguments: '"C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe" -uninstall -quiet -burn.related.upgrade'
[0D70:1560][2013-12-24T08:46:11]i319: Applied execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, result: 0x0, restart: None
显示正在卸载捆绑包的早期版本

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>

它成功了,因此应该删除ARP条目。查找该调用的烧录日志。

Cudos to Bob以找到答案。
        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
我使用的托管BA中似乎真的有一个bug,那就是以Laika42为主题的Bootstrapper灯

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
我创建了一个测试项目来验证该行为,并将其上传到我的

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
我所做的:

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
  • 创建了一个简单的控制台应用程序“AwesomeApp”,以便安装一些东西
  • 为它创建了一个安装项目
  • 为它创建了一个WIX引导程序项目
  • 为它创建了一个Lakia42引导程序项目

  •         <Chain>
          <!--<PackageGroupRef Id="NetFx40Web" />
    
          <RollbackBoundary />-->
    
          <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
          <MsiPackage Id="Setup"
                      Compressed="yes"
                      SourceFile="$(var.AwesomeSetup.TargetPath)"
                      Vital="yes">
            <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
            <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
          </MsiPackage>
            </Chain>
        </Bundle>
    </Wix>
    
  • 现在,当我安装普通引导程序,然后提升引导程序版本和安装程序版本并再次安装它时,旧应用程序及其ARP条目被正确删除

  •         <Chain>
          <!--<PackageGroupRef Id="NetFx40Web" />
    
          <RollbackBoundary />-->
    
          <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
          <MsiPackage Id="Setup"
                      Compressed="yes"
                      SourceFile="$(var.AwesomeSetup.TargetPath)"
                      Vital="yes">
            <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
            <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
          </MsiPackage>
            </Chain>
        </Bundle>
    </Wix>
    
  • 当我安装Laika bootstrapper,然后提高其版本和设置并再次安装时,旧的应用程序被删除*,但旧的ARP条目仍保留在列表中*

  •         <Chain>
          <!--<PackageGroupRef Id="NetFx40Web" />
    
          <RollbackBoundary />-->
    
          <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
          <MsiPackage Id="Setup"
                      Compressed="yes"
                      SourceFile="$(var.AwesomeSetup.TargetPath)"
                      Vital="yes">
            <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
            <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
          </MsiPackage>
            </Chain>
        </Bundle>
    </Wix>
    
非常讨厌的虫子,它占用了我好几个小时的时间。。。非常感谢你,鲍勃

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>
更新:我刚收到一封来自Laika42的邮件,邮件中带有修补的托管BA dll。现在它就像一个符咒。希望他们能很快出版在此之前,请小心使用Laika42引导程序指示灯

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>

鲍勃:我想我欠你一杯冰啤酒,对吧?你来维也纳时给我打个电话;-)

我错过什么了吗?我以为这些是燃烧日志。。。至少我使用“AwesomeSetup.exe/log MyLogFile.log”启动了burn安装程序(请参阅中的第一个答案),我搜索了文档(可能不够好?),但找不到有关burn在何处存储其日志文件的任何信息,所以我想这就是它….:|卸载旧的捆绑包时,它会创建自己的日志集。因为新版本报告旧版本成功,所以您需要旧版本的日志来找出为什么它没有删除旧的ARP条目。这似乎是合理的,但我无法确定这些日志应该放在哪里。你能给我发一个操作指南之类的链接吗?对不起,我讨厌的无能…:|我想它们应该在你粘贴的“主”日志旁边。如果没有,Burn会默认将日志放在%TMP%(或%TMP%\…如果您在终端服务计算机上运行)。感谢您的提示,我找到了日志,它显示“AwesomeApp”的旧版本已被删除-至少它的文件夹和图标以及所有内容。但不幸的是,ARP中捆绑包的条目(我指的是“程序和功能”列表)没有被删除,我需要修复它。有什么想法吗?为了完整性:但是在哪里发生了变化?我在我们的捆绑包中也经历了同样的情况,似乎捆绑包也看到了第四位的版本变化,而msi只使用了三位?你说的“变化在哪里”是什么意思?在我报告后,他们修复的只是Laika42引导程序中的一个bug。
        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>