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

Working with Features and Components

· 52CE 我爱测

There are several functions that change the installation of product components and features. The following describes how to change features and components.

There are several functions that change the installation of product components and features. The following describes how to change features and components.

To change the installation of features and components

  1. Set the installation level for a component or feature by calling the MsiSetInstallLevel function.

    Each feature in a package is assigned an installation level in the Feature table. If the installation level of a feature is lower than the level set by MsiSetInstallLevel, the feature is selected for installation. After MsiSetInstallLevel is called, you can explicitly change whether a feature is installed.

  2. Determine which states are available for a specified feature by calling the MsiGetFeatureValidStates function.

  3. Obtain the disk space requirements for a specified feature and its child features by calling the MsiGetFeatureCost function.

  4. Obtain the current state of a feature or component by calling the MsiGetFeatureState function or the MsiGetComponentState function.

  5. Change the state of the feature or component with the MsiSetFeatureState function or the MsiSetComponentState function.

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)

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

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