【问题标题】:wix components not removed on uninstall卸载时未删除 wix 组件
【发布时间】:2015-10-10 20:51:08
【问题描述】:

您好,我已经看到有关此主题的其他问题,但我尝试的任何方法似乎都不起作用。 在卸载我的产品时,我在日志文件中收到许多消息,如下所示: 不允许卸载组件:{895A2232-90E3-417B-AF3D-A4F5A8D1C225},因为存在另一个客户端

这篇文章... Wix does not remove service and files on uninstall ...提示我运行 MsiInv,它记录了几次:'Component x has no parent product'

这篇文章:http://www.itninja.com/question/disallowing-uninstallation-of-component-xxx 提示我查找并删除孤立条目...我什至尝试过运行 AVG 注册表清理程序。

但是,卸载时仍然没有删除这些文件。所以我一直在通过卸载测试上述解决方案(例如删除孤立的注册表项),然后手动删除文件,然后更新产品版本并重新安装。

相关代码sn-ps:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" 
       Name="My Product Name" 
       Language="1033" 
       Version="1.0.118.0"
       Manufacturer="My Company Name"
       UpgradeCode="DEA53C73-EE29-4D5E-A3FF-0A09D0F50AF3">

    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<!--<UIRef Id="WixUI_Minimal" />-->

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

<!-- Force administrator-->
<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

    <Feature Id="ProductFeature" Title="My Installer Name" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
</Feature>
...
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
  <Component Id="CMP_INSTALL_FOLDER" Guid="DA711C12-A960-421F-A6A9-5ECF0DEEE2BC" Permanent ="no">
    <RemoveFolder Id='RemovInstallFolder' Directory='INSTALLFOLDER' On='uninstall' />
    <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\InstallFolder' Type='string' Value='' KeyPath='yes' />
  </Component>


  <Component Id="exampleComponent"
        Guid="A0AFBE29-6962-4491-9D2F-D08E0B31C6BA" Permanent ="no">
        <File Id="exampleComponentName"
        Source="exampleSource"
        KeyPath="yes" />
  </Component>

</ComponentGroup>

【问题讨论】:

  • 你在哪里测试?在干净的机器上(应用了新映像或检查点?)还是在已经存在很长时间的开发机器上?

标签: wix


【解决方案1】:

感谢 Chris 建议对新图像进行测试。这让我找到了答案。 我的问题是自定义操作(正在运行可执行文件)失败。一旦我设置“未安装”条件以防止在卸载时运行自定义操作,它就开始工作

    <InstallExecuteSequence>
  <Custom Action="CA_RunRegisterDLLScript" After="InstallFiles" >
    NOT Installed
  </Custom>
</InstallExecuteSequence>

它仍然无法在开发机器上工作 - 我放弃了...

我在此过程中学到的另一个技巧是如何在详细的 MSI 日志文件中查找根本原因问题。简短的回答 - 寻找“返回值 = 3” - 问题几乎总是在它上面
我在这里找到了这个提示:http://blogs.msdn.com/b/astebner/archive/2005/08/01/446328.aspx

【讨论】:

    猜你喜欢
    • 2010-09-16
    • 2018-05-14
    • 2011-11-23
    • 1970-01-01
    • 2011-05-08
    • 1970-01-01
    • 1970-01-01
    • 2014-10-16
    • 1970-01-01
    相关资源
    最近更新 更多