Export (0) Print
Expand All
Expand Minimize

MsiConfigureProduct function

The MsiConfigureProduct function installs or uninstalls a product.

Syntax


UINT MsiConfigureProduct(
  _In_  LPCTSTR szProduct,
  _In_  int iInstallLevel,
  _In_  INSTALLSTATE eInstallState
);

Parameters

szProduct [in]

Specifies the product code for the product to be configured.

iInstallLevel [in]

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.

ValueMeaning
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 [in]

Specifies the installation state for the product. This parameter can be one of the following values.

ValueMeaning
INSTALLSTATE_LOCAL

The product is to be installed with all features installed locally.

INSTALLSTATE_ABSENT

The product is uninstalled.

INSTALLSTATE_SOURCE

The product is to be installed with all features installed to run from source.

INSTALLSTATE_DEFAULT

The product is to be installed with all features installed to the default states specified in the Feature Table.

INSTALLSTATE_ADVERTISED

The product is advertised.

 

Return value

ValueMeaning
ERROR_INVALID_PARAMETER

An invalid parameter is passed to the function.

ERROR_SUCCESS

The function succeeds.

An error that relates to an action

For more information, see Error Codes.

Initialization Error

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.

Requirements

Version

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.

Header

Msi.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiConfigureProductW (Unicode) and MsiConfigureProductA (ANSI)

See also

Multiple-Package Installations

 

 

Community Additions

ADD
Show:
© 2014 Microsoft