SetInstallLevel Method (installLevel)

Microsoft Deployment Tools

Deployment Tools Foundation SetInstallLevel Method (installLevel)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerSessionSetInstallLevel(Int32)
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. Also sets the Action state of each component in the Component table based on the new level.
Declaration Syntax
C# Visual Basic Visual C++
public void SetInstallLevel(
	int installLevel
)
Public Sub SetInstallLevel ( _
	installLevel As Integer _
)
public:
void SetInstallLevel(
	int installLevel
)
Parameters
installLevel (Int32)
New install level
Remarks

The SetInstallLevel method 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
If 0 or a negative number is passed in the ilnstallLevel parameter, the current installation level does not change, but all features are still updated based on the current installation level.

Win32 MSI API: MsiSetInstallLevel

Exceptions
Exception Condition
InvalidHandleException the Session handle is invalid

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)