我从与 VS 2010 一起打包的 Microsoft 安装程序切换到 Wix 3.6。我正在尝试通过使用<MajorUpgrade/>
标签向我们的用户发布无缝升级,但是我有一个功能我不想在执行此操作时被卸载重大升级。
如下所示,RemoveFeatures="[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>