MsiConfigureProduct

[This is preliminary documentation and subject to change.]

The MsiConfigureProduct function installs or uninstalls a product.

UINT MsiConfigureProduct(
  LPCTSTR szProduct,            // product code
  int iInstallLevel,            // install level
  INSTALLSTATE eInstallState    // install state
);
 

Parameters

szProduct
Specifies the product code for the product to be configured.
iInstallLevel
Specifies how much of the product should be installed when installing the product to its default state. The iInstallLevel parameter will be ignored, and all features will be installed, if the eInstallState parameter is set to any other value than INSTALLSTATE_DEFAULT.

This parameter can be one of the following values.
Value Meaning
INSTALLLEVEL_DEFAULT The authored default features are installed.
INSTALLLEVEL_MINIMUM Only the required features are installed. You can specify a value between INSTALLLEVEL_MINIMUM and INSTALLLEVEL_MAXIMUM to install a subset of available features.
INSTALLLEVEL_MAXIMUM All features are installed. You can specify a value between INSTALLLEVEL_MINIMUM and INSTALLLEVEL_MAXIMUM to install a subset of available features.

eInstallState
Specifies the installation state for the product. This parameter can be one of the following values.
Value Meaning
INSTALLSTATE_LOCAL The product is installed locally.
INSTALLSTATE_ABSENT The product is uninstalled.
INSTALLSTATE_SOURCE The product is installed to run from source.
INSTALLSTATE_DEFAULT The product is installed to its default location.

Return Values

ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_SUCCESS
The function succeeded.
Any Action Error
An error relating to an action occurred.
Any Initialization Error
An error relating to initialization occurred.

Remarks

The MsiConfigureProduct function displays the user interface using the current settings. User interface settings can be changed with MsiSetInternalUI and MsiSetExternalUI.

The iInstallLevel parameter will be ignored, and all features of the product will be 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.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msi.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Installation and Configuration Functions