The MsiConfigureProductEx function installs or uninstalls a product. A product command line can also be specified.
Syntax
C++UINT MsiConfigureProductEx(
__in LPCTSTR szProduct,
__in int iInstallLevel,
__in INSTALLSTATE eInstallState,
__in LPCTSTR szCommandLine
);
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 parameters are ignored, and all features are installed, if the eInstallState parameter is set to any value other 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 [in]
-
Specifies the installation state for the product. This parameter can be one of the following values.
Value Meaning - 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.
- szCommandLine [in]
-
Specifies the command-line property settings. This should be a list of the format Property=Setting Property=Setting. For more information, see About Properties.
Return Value
Value | Meaning |
---|---|
|
An invalid parameter is passed to the function. |
|
The function succeeded. |
|
For more information, see Error Codes. |
An error relating to initialization occurred. |
Remarks
The command line passed in as szCommandLine can contain any of the Feature Installation Options Properties. In this case, the eInstallState passed must be INSTALLSTATE_DEFAULT.
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.
The MsiConfigureProductEx function displays the user interface using the current settings. User interface settings can be changed with MsiSetInternalUI, MsiSetExternalUI, or MsiSetExternalUIRecord.
Requirements
Version | Windows Installer 5.0 on 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, Windows XP, and Windows 2000. 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 | MsiConfigureProductExW (Unicode) and MsiConfigureProductExA (ANSI) |
See Also
- Installation and Configuration Functions
- Error Codes
- Initialization Error
- Displayed Error Messages
- Multiple-Package Installations
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.