MsiSetMode

[This is preliminary documentation and subject to change.]

The MsiSetMode function sets an internal engine Boolean state.

UINT MsiSetMode(
  MSIHANDLE hInstall,     // installer handle
  unsigned int iRunMode,  // run mode
  BOOL fState             // state to set
);
 

Parameters

hInstall
Handle to the installer.
iRunMode
Specifies the run mode.
fState
Specifies the state to set. This parameter must be one of the following values. While there are many values for this parameter, as described in MsiGetMode, only one of the following values can be set.
Value Meaning
MSIRUNMODE_REBOOTATEND A reboot is necessary after a successful installation.
MSIRUNMODE_REBOOTNOW A reboot is necessary to continue installation.

Return Values

ERROR_ACCESS_DENIED
Access was denied.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_SUCCESS
The function succeeded.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.

See Also

Database Access Reference, Installer State Access Functions