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

Using Qualified Components

· 52CE 我爱测

Qualified components are a method of indirection and can be used to group components with parallel functionality into categories.

Qualified components are a method of indirection and can be used to group components with parallel functionality into categories.

To return the full path and install a qualified component, call MsiProvideQualifiedComponent or MsiProvideQualifiedComponentEx.

To enumerate all of the qualified component qualifiers and descriptive strings, call MsiEnumComponentQualifiers.

To group components together into a qualified-component category

  1. There must be a record in the Component table for each component that is included in the new category of qualified components. Author the fields in the Component table the same as for ordinary components. Note that each qualified component must have a unique component ID GUID entered in the ComponentId column of the Component table.
  2. Generate a qualifier text string for each qualified component. The qualifier must be unique text string that can be easily generated when searching for a qualified component. For example, if the components in the category are being qualified by language, the numeric locale identifier (LCID) is a reasonable qualifier string.
  3. Add a record in the PublishComponent table for each qualified component. Enter the qualified-component identifiers from the Component column of the Component table into the Component_ column of the PublishComponent table. Enter the qualifier strings for each qualified component into the Qualifier column. Enter a localized string to be displayed to the user and describing the qualified component into the optional AppData column. An explanatory string should be put in the AppData field, such as "French Dictionary," rather than just the numeric LCID. Enter the name of the feature that uses this component into the Feature_ column. The feature identifier in this field must also be listed in the Feature column of the Feature table.
  4. Generate a category GUID for this category of qualified components. This must be a valid GUID. If you use a utility such as GUIDGEN to generate the GUID be sure that it contains only uppercase letters. For every qualified component in this category, enter the category GUID into the ComponentId field of the PublishComponent table.

The following example illustrates how the "FAX Templates" category of qualified components are authored into the Component, Feature, and PublishComponent tables.

PublishComponent table

ComponentId Qualifier AppData Feature_ Component_
{FAX Template Category GUID} 1033 US English template FAXTemplate FAXTemplateENU
1041 Japanese template FAXTemplate FAXTemplateJPN
1054 Thai template FAXTemplate FAXTemplateTHA
1031 German template FAXTemplate FAXTemplateDEU

Component table (partial table)

Component ComponentId
FAXTemplateENU {FAX Template (US English) component GUID}
FAXTemplateJPN {FAX Template (Japanese) component GUID}
FAXTemplateTHA {FAX Template (Thai) component GUID}
FAXTemplateDEU {FAX Template (German) component GUID}

Feature table (partial table)

Feature
FAXTemplate
FAXTemplate
FAXTemplate
FAXTemplate

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)

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

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