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

Using Properties in Conditional Statements

· 52CE 我爱测

The logical value of a property that has been set is True.

The logical value of a property that has been set is True. To determine whether a property is set without actually getting its value, test the logical expression "MyProperty" or "Not MyProperty". When the property MyProperty is set, the former evaluates as True and the latter as False.

One or more properties can be combined with operators to form logical expressions used in a conditional statements. For more information about the operators that can be used in conditional statements, see Conditional Statement Syntax.

A conditional statement using properties can be entered into the Condition column of the Condition table to modify the selection state of any entry in the Feature table.

Conditional statements with one or more properties are commonly used in the Condition column of database tables.

The following tables each have a column for conditional expressions:

Note that the six action sequence tables have fields for a condition. If the conditional expression in this field evaluates to False, the installer skips that action.

If you set a private property in the UI sequence by authoring a custom action in one of the user interface sequence tables, that property is not set in the execution sequence. To set the property in the execution sequence you must also put a custom action in an execution sequence table. Alternatively, you can make the property a public property and include it in the SecureCustomProperties property.

For more information, see Using a Sequence Table or Using Properties.

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)

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

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