Wix 如何使用MajorUpgrade和RemoveFeatures仅删除特定功能,并且仍然取消安装产品的早期版本

Wix 如何使用MajorUpgrade和RemoveFeatures仅删除特定功能,并且仍然取消安装产品的早期版本,wix,wix3.6,Wix,Wix3.6,我从与VS2010一起打包的Microsoft安装程序中切换到Wix 3.6。我试图通过使用标签向我们的用户发布无缝升级,但是我有一个功能,我不想在执行此主要升级时取消安装 如下所示,我有removeffeatures=“[ProductFeature]”,这将导致仅删除ProductFeature,而保留DataFeature,但这将导致该条目不会像未指定此参数时那样从Windows中的“程序和功能”列表中删除。如何在不卸载特定功能的情况下正确升级 <Product Id="*"

我从与VS2010一起打包的Microsoft安装程序中切换到Wix 3.6。我试图通过使用
标签向我们的用户发布无缝升级,但是我有一个功能,我不想在执行此主要升级时取消安装

如下所示,我有
removeffeatures=“[ProductFeature]”
,这将导致仅删除ProductFeature,而保留DataFeature,但这将导致该条目不会像未指定此参数时那样从Windows中的“程序和功能”列表中删除。如何在不卸载特定功能的情况下正确升级

<Product Id="*" 
       Name="$(var.MyProject.ProjectName)" 
       Language="1033" 
       Version="2.6.0.0" 
       Manufacturer="Awesome Software (Pty) Ltd"          
       UpgradeCode="D7B99D7F-340D-449D-9C18-5D4A4A9B13D5">       
<Package InstallerVersion="405"
         Compressed="yes"              
         Description="Installs $(var.MyProject.ProjectName)"             
     Keywords="Awesome"
     InstallScope="perMachine"/>

<WixVariable Id="WixUILicenseRtf" Value="$(var.SolutionDir)\awesome.EULA\awesome CE Eula.rtf" />
<MediaTemplate EmbedCab="yes"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." 
RemoveFeatures="[ProductFeature]" Schedule="afterInstallInitialize"/>

<Feature Id="ProductFeature" Title="Setup $(var.MyProject.ProjectName)" Level="1">      
  <ComponentGroupRef Id="FilesFragment" />
  <ComponentRef Id="C__5B1F76E18B8F479DAAA1B8C14E4B0638"/>
  <ComponentRef Id="C__5B1F76E18B8F479DAAA1B8C14E4B0639"/>
  <ComponentRef Id="cmpA0688C6933D519CB5D1B6D48D50F1E21"/>
</Feature>

<Feature Id="DataFeature" Title="Data $(var.MyProject.ProjectName)" Level="1" >
  <ComponentGroupRef Id="DataFragment" />
</Feature>

<!-- Wix UI Prompts -->
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER"/>            
<UIRef Id="WixUI_InstallDir"/>

<Binary Id="myCustomActionsDLL" SourceFile="$(var.CustomActions.TargetDir)MaxCut.CustomActions.CA.dll"/>

<InstallExecuteSequence>
  <Custom Action="CA_myCustomAction" Before="InstallInitialize"/>
</InstallExecuteSequence>


如果您不卸载所有功能,Windows安装程序将在计算机上保留旧产品。在卸载过程中,当
功能
下的
条件
计算为false时,通常会发生这种情况。你已经找到了另一种方法来解决这个问题。每次这种情况发生时,人们都会感到困惑


简短回答:您无法对功能执行您试图执行的操作。

虽然您的回答非常含蓄,但我能够找到我的方法并使用功能下的子元素字段。谢谢