MsiGetMode function (msiquery.h)
The MsiGetMode function is used to determine whether the installer is currently running in a specified mode, as listed in the table. The function returns a Boolean value of TRUE or FALSE, indicating whether the specific property passed into the function is currently set (TRUE) or not set (FALSE).
Syntax
BOOL MsiGetMode(
[in] MSIHANDLE hInstall,
[in] MSIRUNMODE eRunMode
);
Parameters
[in] hInstall
Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.
[in] eRunMode
Specifies the run mode. This parameter must have one of the following values.
Value | Meaning |
---|---|
|
The administrative mode is installing, or the product is installing. |
|
The advertisements are installing or the product is installing or updating. |
|
An existing installation is being modified or there is a new installation. |
|
Rollback is enabled. |
|
The log file is active. It was enabled prior to the installation session. |
|
Execute operations are in the determination phase. |
|
A reboot is necessary after a successful installation (settable). |
|
A reboot is necessary to continue the installation (settable). |
|
Files from cabinets and Media table files are installing. |
|
The source LongFileNames is suppressed through the PID_MSISOURCE summary property. |
|
The target LongFileNames is suppressed through the SHORTFILENAMES property. |
|
Reserved for future use. |
|
The operating system is a 9x version. |
|
The operating system supports demand installation. |
|
Reserved for future use. |
|
Reserved for future use. |
|
A custom action called from install script execution. |
|
A custom action called from rollback execution script. |
|
A custom action called from commit execution script. |
Return value
TRUE indicates the specific property passed into the function is currently set.
FALSE indicates the specific property passed into the function is currently not set.
Remarks
Note that not all the run mode values of iRunMode are available when calling MsiGetMode from a deferred custom action. For details, see Obtaining Context Information for Deferred Execution Custom Actions.
Requirements
Requirement | Value |
---|---|
Minimum supported client | 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 |
Target Platform | Windows |
Header | msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |