MsiConfigureFeatureA function (msi.h)

The MsiConfigureFeature function configures the installed state for a product feature.


UINT MsiConfigureFeatureA(
  [in] LPCSTR       szProduct,
  [in] LPCSTR       szFeature,
  [in] INSTALLSTATE eInstallState


[in] szProduct

Specifies the product code for the product to be configured.

[in] szFeature

Specifies the feature ID for the feature to be configured.

[in] eInstallState

Specifies the installation state for the feature. This parameter must be one of the following values.

Value Meaning
The feature is advertised
The feature is installed locally.
The feature is uninstalled.
The feature is installed to run from source.
The feature is installed to its default location.

Return value

Value Meaning
An invalid parameter is passed to the function.
The function succeeds.
An error relating to an action
For more information, see Error Codes.
Initialization Error
An error that relates to the initialization has occurred.



The msi.h header defines MsiConfigureFeature as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.


Requirement Value
Minimum supported client Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.
Target Platform Windows
Header msi.h
Library Msi.lib
DLL Msi.dll

See also

Displayed Error Messages

Error Codes

Initialization Error

Installation and Configuration Functions

Multiple-Package Installations