MsiDoAction

[This is preliminary documentation and subject to change.]

The MsiDoAction function executes a built-in action, custom action, or user-interface wizard action.

UINT MsiDoAction(
  MSIHANDLE hInstall,    // installer handle
  LPCTSTR szAction       // action
);
 

Parameters

hInstall
Handle to the installation.
szAction
Specifies the action to execute.

Return Values

ERROR_FUNCTION_FAILED
The function failed.
ERROR_FUNCTION_NOT_CALLED
The action was not found.
ERROR_INSTALL_FAILURE
The action failed.
ERROR_INSTALL_SUSPEND
The user suspended the installation.
ERROR_INSTALL_USEREXIT
The user canceled the action.
ERROR_INVALID_DATA
A failure occurred while calling the custom action.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_HANDLE_STATE
The handle state was invalid.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_MORE_DATA
The action indicates that the remaining actions should be skipped.
ERROR_SUCCESS
The function succeeded.

Remarks

The MsiDoAction function executes the action that corresponds to the name supplied. If the name is not recognized by the engine as a built-in action or as a custom action in the CustomAction table, the name is passed to the user-interface handler object, which can invoke a function or a dialog box. If a NULL action name is supplied, the engine uses the upper-case value of the ACTION property as the action to perform. If no property value is defined, the default action is performed, defined as "INSTALL".

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.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Database Access Reference, Installer Action Functions