FeatureRequestState Property

[This is preliminary documentation and subject to change.]

This is the FeatureRequestState property of the MsiEngine object. This property is used to obtain or request a change in the Select state of a feature's record (and of the feature's subrecords) in the Feature table. In turn, the Action state of all the components linked to the changed feature records are also updated appropriately, based on the new feature Select state. FeatureRequestState can also be used to configure all features at once by specifying the keyword ALL instead of a specific feature name.

Syntax

object.FeatureRequestState(strFeature)

Parts

object
MsiEngine object.
strFeature
Required string specifying the name of the feature to be configured. Alternatively, the reserved word ALL (not case sensitive) can be used, indicating that all features should be configured to the state specified by the iisState parameter. For example, if iisAbsent is specified in the iisState parameter, and ALL is specified in the strFeature parameter, the entire product is removed.

Selection States

Null (empty) = Requests that no action be taken for this item.
iisAbsent = 2: Item is to be removed.
iisLocal = 3: Item is to be installed locally.
iisSource = 4: Item is to be installed and run from the source media.
iisDefault = 5: If the feature is installed, reinstall it in the same state.

Remarks

The SetInstallLevel method must be called before calling FeatureRequestState.

When FeatureRequestState is called, the Engine attempts to set the Action state of each component tied to the specified feature to the specified state, as best as possible. However, there are common situations when the request cannot be fully honored. For example, suppose a feature is tied to two components, Component A and Component B (via the FeatureComponents table). Also suppose that Component A is authored with a RunFromSource option of irsLocalOnly, and Component B is irsSourceOnly. In this case, if FeatureRequestState is called with a requested state of either iisLocal or iisSource, there is no way that the request can be fully honored for both components. However, both components can be turned ON with component A set to iisLocal and component B set to iisSource.

If more than one feature is linked to a single component (a common scenario), the final Action state of that component is determined as follows: If at least one feature calls for the component to be installed locally, it is installed iisLocal. If at least one feature calls for the component to be run from the source media, it is installed iisSource'. If at least one feature calls for the removal of the component, the action state is iisAbsent. See the Feature table for more information on how features are selected for installation.