Feature Request Model

[This is preliminary documentation and subject to change.]

As you write applications for the installer environment, remember that the file locations and installation state of features are flexible. Because a particular installation can access the files from a variety of locations, the application benefits most from the flexibility the installer provides if the application always requests features from the installer. Requesting features from the installer provides the added advantage of accurately maintained usage metrics. For a procedure that shows how to request a feature, see Requesting a Feature.

If the application calls MsiUseFeature before the application accesses a feature, the installer maintains usage metrics. One way an application might use this information is to remove a rarely used feature from the hard drive or to move a frequently used feature from the source medium to the local hard drive.

To request features in the installer, use MsiEnumFeatures, MsiQueryFeatureState, MsiUseFeature, MsiGetFeatureUsage, MsiConfigureFeature, and MsiGetComponentPath as shown in the following diagram.