Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Installer
Installer Database
Database Functions
 MsiSetMode Function
MsiSetMode Function

The MsiSetMode function sets an internal engine Boolean state.

Syntax

C++
UINT MsiSetMode(
  __in  MSIHANDLE hInstall,
  __in  unsigned int iRunMode,
  __in  BOOL fState
);

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 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.

ValueMeaning
MSIRUNMODE_REBOOTATEND

A reboot is necessary after a successful installation.

MSIRUNMODE_REBOOTNOW

A reboot is necessary to continue installation.

 

fState [in]

Specifies the state to set to TRUE or FALSE.

Return Value

ERROR_ACCESS_DENIED

Access was denied.

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_SUCCESS

The function succeeded.

Requirements

VersionWindows 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
HeaderMsiquery.h
LibraryMsi.lib
DLLMsi.dll

See Also

Installer State Access Functions

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker