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
C++BOOL MsiGetMode(
__in MSIHANDLE hInstall,
__in MSIRUNMODE iRunMode
);
Parameters
- hInstall [in]
-
Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.
- iRunMode [in]
-
Specifies the run mode. This parameter must have one of the following values.
Value Meaning - MSIRUNMODE_ADMIN
The administrative mode is installing, or the product is installing.
- MSIRUNMODE_ADVERTISE
The advertisements are installing or the product is installing or updating.
- MSIRUNMODE_MAINTENANCE
An existing installation is being modified or there is a new installation.
- MSIRUNMODE_ROLLBACKENABLED
Rollback is enabled.
- MSIRUNMODE_LOGENABLED
The log file is active. It was enabled prior to the installation session.
- MSIRUNMODE_OPERATIONS
Execute operations are in the determination phase.
- MSIRUNMODE_REBOOTATEND
A reboot is necessary after a successful installation (settable).
- MSIRUNMODE_REBOOTNOW
A reboot is necessary to continue the installation (settable).
- MSIRUNMODE_CABINET
Files from cabinets and Media table files are installing.
- MSIRUNMODE_SOURCESHORTNAMES
The source LongFileNames is suppressed through the PID_MSISOURCE summary property.
- MSIRUNMODE_TARGETSHORTNAMES
The target LongFileNames is suppressed through the SHORTFILENAMES property.
- MSIRUNMODE_RESERVED11
Reserved for future use.
- MSIRUNMODE_WINDOWS9X
The operating system is Windows 98 or Windows 95.
- MSIRUNMODE_ZAWENABLED
The operating system supports demand installation.
- MSIRUNMODE_RESERVED14
Reserved for future use.
- MSIRUNMODE_RESERVED15
Reserved for future use.
- MSIRUNMODE_SCHEDULED
A custom action called from install script execution.
- MSIRUNMODE_ROLLBACK
A custom action called from rollback execution script.
- MSIRUNMODE_COMMIT
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
Version | Windows Installer 5.0 on 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, Windows XP, and Windows 2000 |
---|---|
Header | Msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |
See Also
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.