![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
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.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ | F# |
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 )
static member UseFeature : productCode : string * feature : string * installMode : InstallMode -> InstallState
![](collapse_all.gif)
- productCode (String)
- The product code of the product.
- feature (String)
- The feature to be used.
- installMode (InstallMode)
- Must have the value NoDetection.
![](collapse_all.gif)
InstallState
The installed state of the feature.
The installed state of the feature.
![](collapse_all.gif)
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
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)