Session.Mode property

This is the Mode property of the Session object. This property is a value representing the designated mode flag for the current install session. Most of the mode flags are read-only externally, but a few specified flags may be set as well.

The MsiGetMode function returns a Boolean TRUE or FALSE, indicating whether the specific property passed into the function is currently set (TRUE) or not set (FALSE).

Note that not all the run mode values of flag are available when calling the Mode property from a deferred custom action. For more information, see Obtaining Context Information for Deferred Execution Custom Actions.

This property is read-only.

Syntax

propVal = Session.Mode

Property value

Required integer value for the flag. Must be one of the following:

Flag name Meaning
msiRunModeAdmin
0
Administrative mode install, else product install.
msiRunModeAdvertise
1
Advertise mode of install.
msiRunModeMaintenance
2
Maintenance mode database loaded.
msiRunModeRollbackEnabled
3
Rollback is enabled.
msiRunModeLogEnabled
4
Log file is active.
msiRunModeOperations
5
Executing or spooling operations.
msiRunModeRebootAtEnd
6
Reboot is needed (settable).
msiRunModeRebootNow
7
Reboot is needed to continue installation (settable).
msiRunModeCabinet
8
Installing files from cabinets and files using Media table.
msiRunModeSourceShortNames
9
Source files use only short file names.
msiRunModeTargetShortNames
10
Target files are to use only short file names.
msiRunModeWindows9x
12
Operating system is Windows 98/95.
msiRunModeZawEnabled
13
Operating system supports advertising of products.
msiRunModeScheduled
16
Deferred custom action called from install script execution.
msiRunModeRollback
17
Deferred custom action called from rollback execution script.
msiRunModeCommit
18
Deferred custom action called from commit execution script.

 

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