Wix如何隐藏功能选项 [英] Wix how to hide feature options

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

问题描述

我正在使用Wix 3.5来构建MSI安装程序. 我想知道是否有任何方法可以从功能自定义安装对话框"(从功能树中选择要安装的内容)中隐藏一些选项.

I'm using Wix 3.5 to build a MSI installer. I want to know if there is any way to hide some options from the "Features Custom Setup dialog" (in which you select from the Feature tree what to install).

我只希望有将安装在本地硬盘上"和整个功能将不可用"的选项.

I want to only have the options for "Will be installed on local hard drive" and "Entire feature will be unavailable"

当前,除了这两个选项外,我还有以下选项:

Currently, apart from those two options i have these options:

  • 整个功能将安装在本地硬盘上"
  • 将安装为从网络运行"
  • 将安装整个功能以从网络运行"

推荐答案

功能选择对话框使用

Feature selection dialog uses SelectionTree control, a built-in control of the Windows Installer.

您可以使用 功能元素具有四个属性,用于控制功能的显示方式已安装:

Feature element of WiX has four properties which control how a feature can be installed:

  • 缺席:允许/不允许
  • AllowAdvertise:否/系统/是
  • 安装默认值:followParent/本地/源
  • TypicalDefault:做广告/安装

组件表还控制是否可以从源代码运行组件或不. Component元素具有Location属性:

Component table also controls whether the component can be run from source or not. The Component element has Location property:

  • 本地
    阻止组件从源或网络运行(如果未设置此属性,这是默认行为).

  • 强制该组件只能从源运行(不能从用户计算机运行).
  • 两个
    允许该组件从源代码或本地运行.
  • local
    Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set).
  • source
    Enforces that the component can only be run from the source (it cannot be run from the user's computer).
  • either
    Allows the component to run from source or locally.

因此,要删除从网络运行的选项,请将组件的Location属性设置为local.

So to remove the option to run from the network, set Location property of your components to local.

您无法删除整个功能将从选项中安装在本地硬盘驱动器上.它仅在存在子功能时显示,并且允许安装子功能以及功能本身,而不是将安装在本地硬盘驱动器上,后者仅安装所选功能,不会影响子功能.

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.

如果子功能始终与父功能一起安装,则可以尝试将子功能的InstallDefault属性设置为followParent.

If the subfeatures are always installed with the parent, you can try to set InstallDefault attribute of the subfeatures to followParent.

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

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