Export (0) Print
Expand All
Expand Minimize

MsiSetInstallLevel function

The MsiSetInstallLevel function sets the installation level for a full product installation.

Syntax


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 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

Header

Msiquery.h

Library

Msi.lib

DLL

Msi.dll

See also

Installer Selection Functions

 

 

Community Additions

ADD
Show:
© 2015 Microsoft