Session.SetInstallLevel method
The SetInstallLevel method of the Session object sets the install level for the current installation to a specified value and recalculates the Select and Installed states for all features in the Feature table. It also sets the Action state of each component in the Component table based on the new level.
Syntax
Session.SetInstallLevel(
installLevel
)
Parameters
-
installLevel
-
Required requested new install level.
Return value
This method does not return a value.
Remarks
The CostInitialize action must be executed prior to calling SetInstallLevel.
If 0 is passed for the installLevel parameter, the current install level is not changed, but all features are still updated based on the current install level. For example, this functionality could be used by the Handler module to reset all selections back to their initial default states at any point in the UI selection process.
If the method fails, you can obtain extended error information by using the LastErrorRecord method.
Requirements
Requirement | Value |
---|---|
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 |
DLL |
|
IID |
IID_ISession is defined as 000C109E-0000-0000-C000-000000000046 |