Wix安装程序 - 无法卸载perUser软件包

问题描述:

安装perUser msi软件包后无法卸载它。Wix安装程序 - 无法卸载perUser软件包

Error while uninstalling

选择时(Browse)包 - 即我安装 - 有一个错误:“选择的包不是此产品有效包”。 这里是我的代码:

<?xml version='1.0'?><Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> 
    <Product Id='a871a539-5954-44b7-810d-caed5d09e4c5' Name='x' Language='1033' 
      Version='1.1.0.0' Manufacturer='M' UpgradeCode='a871a539-5954-44b7-810d-caed5d09e4c5'> 
     <Package Description='x' 
       Comments='x' 
       Manufacturer='x' InstallerVersion='200' Compressed='yes' InstallScope='perUser' /> 

    <Media Id='1' Cabinet='product.cab' EmbedCab='yes' /> 

    <Directory Id='TARGETDIR' Name='SourceDir'> 
      <Directory Id='AppDataFolder' Name='AppData'> 
       <Directory Id='xFolder' Name='x' /> 
      </Directory> 
     </Directory> 


      <Component Id='xComponent' Guid='a871a539-5954-44b7-810d-caed5d09e4c5' 
       Directory='xFolder'> 
      <RemoveFolder Id="Removex" On="uninstall" /> 
      <!-- registry entry to be used as keypath --> 
      <RegistryValue Root="HKCU" 
       Key="Software\M\x" 
       Name="component.xcomponent.installed" 
       Type="integer" 
       Value="1" 
       KeyPath="yes"/> 

       <File Id='myFile' Name='myFile.txt' DiskId='1' Source='myFile.txt' /> 
... files here 
</Component> 
<Feature Id='xFeature' Title='x feature' Level='1'> 
    <ComponentRef Id='xComponent' /> 
    </Feature> 

安装过程是确定的 - 没有错误。文件位于正确的位置。注册表项被添加。 我在做什么错?

+0

[卸载Windows服务时,安装的产品与安装源错误不匹配]的可能重复(http://stackoverflow.com/questions/4648521/the-installed-product-does-not-match -the-安装来源-错误时-unins) – 2012-04-06 12:21:29

是的 - 正如Wim Coenen所说 - 这个问题帮助我解决了问题。

然而,不是执行那个问题中的步骤,我清理注册表。 问题是我安装了这个软件包多次改变GUID和其他参数,所以在注册表中有相当大的混乱。我搜索了制造商和名称的注册表。

清理完毕后,一切正常。