MsiConfigureProductA function (msi.h)
The MsiConfigureProduct function installs or uninstalls a product.
Syntax
UINT MsiConfigureProductA(
[in] LPCSTR szProduct,
[in] int iInstallLevel,
[in] INSTALLSTATE eInstallState
);
Parameters
[in] szProduct
Specifies the product code for the product to be configured.
[in] iInstallLevel
Specifies how much of the product should be installed when installing the product to its default state. The iInstallLevel parameter is ignored, and all features are installed, if the eInstallState parameter is set to any other value than INSTALLSTATE_DEFAULT.
This parameter can be one of the following values.
[in] eInstallState
Specifies the installation state for the product. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
The product is to be installed with all features installed locally. |
|
The product is uninstalled. |
|
The product is to be installed with all features installed to run from source. |
|
The product is to be installed with all features installed to the default states specified in the Feature Table. |
|
The product is advertised. |
Return value
Value | Meaning |
---|---|
|
An invalid parameter is passed to the function. |
|
The function succeeds. |
|
For more information, see Error Codes. |
An error that relates to initialization. |
Remarks
The MsiConfigureProduct function displays the user interface (UI) using the current settings. User interface settings can be changed by using MsiSetInternalUI, MsiSetExternalUI or MsiSetExternalUIRecord.
The iInstallLevel parameter is ignored, and all features of the product are installed, if the eInstallState parameter is set to any other value than INSTALLSTATE_DEFAULT. To control the installation of individual features when the eInstallState parameter is not set to INSTALLSTATE_DEFAULT, use MsiConfigureFeature.
Note
The msi.h header defines MsiConfigureProduct as an alias that 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 is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
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 |