Wix 如何隐藏功能选项(无子功能) [英] Wix how to hide feature options (no subfeatures)

查看:26
本文介绍了Wix 如何隐藏功能选项(无子功能)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个类似的问题

在自定义对话框中编辑上下文菜单(选择树)?

但已接受答案中的链接指出:

but the link in the accepted answer states:

您不能从选项中删除整个功能将安装在本地硬盘上.只有在有子功能时才会显示,并且可以安装子功能以及功能本身,而不是从将安装在本地硬盘上,它只安装选定的功能,不影响子功能."

"You cannot remove Entire feature will be installed on local hard drive from the options. It is displayed only when there are subfeatures and enables installation of the subfeatures as well as the feature itself as opposed from Will be installed on local hard drive which installs only the selected features and does not affect subfeatures."

但是,我没有子功能.如何删除整个功能... 选项?

However, I have no subfeatures. How to remove the Entire feature... option?

代码如下:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
   <Product Id="*" Name="WixTestFeatureTree" Language="1033" Version="1.0.0.0" Manufacturer="TestManufacturer" UpgradeCode="bb04a635-6251-4fd5-8d2f-182d3441dc0a">
      <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

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

      <UIRef Id="WixUI_FeatureTree" />
      <UIRef Id="WixUI_ErrorProgressText" />

      <Feature Id="ExeFeature" Title="The EXE file" Level="1">
         <Component Id="TheApp" Guid="*" Directory="INSTALLFOLDER">
            <File Id="TestExe" Source="Test.exe" Vital="yes"></File>
         </Component>
      </Feature>

      <Feature Id="PdfFeature" Title="The PDF file" Level="1">
         <Component Id="ThePDF" Guid="*" Directory="INSTALLFOLDER">
            <File Id="TestPDF" Source="Test.pdf" Vital="yes"></File>
         </Component>
      </Feature>
   </Product>

   <Fragment>
      <Directory Id="TARGETDIR" Name="SourceDir">
         <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="WixTestFeatureTree" />
         </Directory>
      </Directory>
   </Fragment>
</Wix>

推荐答案

看起来 Windows Installer 总是 显示 Entire feature will install on local hard drive 项目即使有没有子特征.至少在我测试的所有没有可见子特征的情况下都存在这个项目.它还可能取决于 Windows 安装程序的版本,我在 Windows 7 中测试了所有最新更新.

It looks Windows Installer always displays Entire feature will be installed on local hard drive item even if there are no subfeatures. At least this item was present in all the cases that I tested where there were no visible subfeatures. It could also depend on the version of Windows Installer, I tested in Windows 7 with all the latest updates.

我一直认为 Windows Installer 不显示整个功能将安装在本地硬盘驱动器项中没有子功能的功能.最新的测试证明我错了.

I've always thought Windows Installer doesn't display Entire feature will be installed on local hard drive item for a feature which has no subfeatures. Latest tests proved I was wrong.

这篇关于Wix 如何隐藏功能选项(无子功能)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆