MsiSequence Function

Windows Installer

MsiSequence Function

The MsiSequence function executes another action sequence, as described in the specified table.

Syntax

C++UINT MsiSequence(
  __in  MSIHANDLE hInstall,
  __in  LPCTSTR szTable,
  __in  INT iSequenceMode
);

Parameters

hInstall [in]

Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.

szTable [in]

Specifies the name of the table containing the action sequence.

iSequenceMode [in]

This parameter is currently unimplemented. It is reserved for future use and must be 0.

Return Value

ERROR_FUNCTION_FAILED

The function failed.

ERROR_FUNCTION_NOT_CALLED

The function was not called.

ERROR_INSTALL_FAILURE

An installation failure occurred.

ERROR_INSTALL_SUSPEND

The installation was suspended.

ERROR_INSTALL_USEREXIT

The user exited the installation.

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_INVALID_HANDLE_STATE

An invalid handle state occurred.

ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_SUCCESS

The function succeeded.

Remarks

The MsiSequence function queries the specified table, ordering the actions by the numbers in the Sequence column. For each row retrieved, an action is executed, provided that any supplied condition expression does not evaluate to FALSE.

An action sequence containing any actions that update the system, such as the InstallFiles and WriteRegistryValues actions, cannot be run by calling MsiSequence. The exception to this rule is if MsiSequence is called from a custom action that is scheduled in the InstallExecuteSequence table between the InstallInitialize and InstallFinalize actions. Actions that do not update the system, such as AppSearch or CostInitialize, can be called.

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
Unicode and ANSI namesMsiSequenceW (Unicode) and MsiSequenceA (ANSI)

See Also

Installer Action Functions

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.