Working with Features and Components
[This is preliminary documentation and subject to change.]
There are several functions that change the installation of product components and features. The following procedure describes how to change the features and components.
To change the installation of features and components
-
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 will be installed.
-
Determine which states are available for a specified feature by calling the MsiGetFeatureValidStates function.
-
Obtain the disk space requirements for a specified feature and its child features by calling the MsiGetFeatureCost function.
-
Obtain the current state of a feature or component by calling the MsiGetFeatureState function or the MsiGetComponentState function.
-
Change the state of the feature or component with the MsiSetFeatureState function or the MsiSetComponentState function.