大网数据广告活动
安装更新与部署

Condition Table

· 52CE 我爱测

The Condition table can be used to modify the selection state of any entry in the Feature table based on a conditional expression.

The Condition table can be used to modify the selection state of any entry in the Feature table based on a conditional expression.

The Condition table has the following columns.

Column Type Key Nullable
Feature_ Identifier Y N
Level Integer Y N
Condition Condition N Y

Columns

Feature_

External key into column one of the Feature table.

Level

A conditional install level for the feature in the Feature_ column of this table. The installer sets the install level of this feature to the level specified in this column if the expression in the Condition column evaluates to TRUE.

Condition

If this conditional expression evaluates to TRUE, then the Level column in the Feature table is set to the conditional install level.

The expression in the Condition column should not contain reference to the installed state of any feature or component. This is because the expressions in the Condition column are evaluated before the installer evaluates the installed states of features and components. Any expression in the Condition table that attempts to check the installed state of a feature or component always evaluates to false.

For information on the syntax of conditional statements, see Conditional Statement Syntax.

Remarks

A feature can be permanently disabled by setting the Level column to 0.

The Level may be set based on any conditional statement, such as a test for platform, operating system, or a particular property setting.

Conditions should be carefully chosen so that a feature is not enabled on install and then disabled on uninstall. This will orphan the feature and the product will not be able to be uninstalled.

This table is referred to when the CostFinalize action is executed.

If the Preselected property has been set to 1, the installer does not evaluate the Condition table. The Condition table affects only the installation of features when none of the following properties have been set:

ADDLOCAL
REMOVE
ADDSOURCE
ADDDEFAULT
REINSTALL
ADVERTISE
COMPADDLOCAL
COMPADDSOURCE
COMPADDDEFAULT
FILEADDLOCAL
FILEADDSOURCE
FILEADDDEFAULT

Validation

ICE03
ICE06
ICE32
ICE46
ICE79
ICE86

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。