Deployment Tools Foundation
UseFeature Method (productCode, feature, installMode)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Installer ► UseFeature(String, String, InstallMode)
increments the usage count for a particular feature and returns the installation state for
that feature. This method should be used to indicate an application's intent to use a feature.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static InstallState UseFeature( string productCode, string feature, InstallMode installMode )
Public Shared Function UseFeature ( _ productCode As String, _ feature As String, _ installMode As InstallMode _ ) As InstallState
public: static InstallState UseFeature( String^ productCode, String^ feature, InstallMode installMode )
Parameters
- productCode (String)
- The product code of the product.
- feature (String)
- The feature to be used.
- installMode (InstallMode)
- Must have the value NoDetection.
Return Value
The installed state of the feature.
Remarks
The UseFeature method should only be used on features known to be published. The application should determine the status of the feature by calling either the FeatureState method or Features method.
Win32 MSI APIs: MsiUseFeature, MsiUseFeatureEx