The MsiSetInstallLevel function sets the installation level for a full product installation.
Syntax
C++UINT MsiSetInstallLevel(
__in MSIHANDLE hInstall,
__in int iInstallLevel
);
Parameters
- hInstall [in]
-
Handle to the installation that is provided to a DLL custom action or obtained by using MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.
- iInstallLevel [in]
-
The installation level.
Return Value
The MsiSetInstallLevel function returns one of the following values:
- ERROR_FUNCTION_FAILED
-
The function failed.
- ERROR_INVALID_HANDLE
-
An invalid or inactive handle is supplied.
- ERROR_SUCCESS
-
The function succeeded.
Remarks
The MsiSetInstallLevel function sets the following:
- The installation level for the current installation to a specified value.
- The Select and Installed states for all features in the Feature table.
- The Action state of each component in the Component table, based on the new level.
For any installation, there is a defined install level, which is an integral value from 1 to 32,767. The initial value is determined by the INSTALLLEVEL property, which is set in the Property Table.
If 0 (zero) or a negative number is passed in the iInstallLevel parameter, the current installation level does not change, but all features are still updated based on the current installation level. For more information, see Calling Database Functions From Programs.
If the function fails, you can obtain extended error information by using MsiGetLastErrorRecord.
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 |
---|---|
Header | Msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |
See Also
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.