![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
GetMode Method (mode)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Session ► GetMode(InstallRunMode)
Gets the designated mode flag for the current install session.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ |
public bool GetMode( InstallRunMode mode )
Public Function GetMode ( mode As InstallRunMode ) As Boolean
public: bool GetMode( InstallRunMode mode )
![](collapse_all.gif)
- mode (InstallRunMode)
- The type of mode to be checked.
![](collapse_all.gif)
Boolean
The value of the designated mode flag.
The value of the designated mode flag.
![](collapse_all.gif)
Note that only the following run modes are available to read from a deferred custom action:
Win32 MSI API: MsiGetMode
![](collapse_all.gif)
Exception | Condition |
---|---|
InvalidHandleException | the Session handle is invalid |
ArgumentOutOfRangeException | an invalid mode flag was specified |
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)