Custom Action Return Values
If the msidbCustomActionTypeContinue return processing option is not set, the custom action must return an integer status code as shown in the following table.
| Return value | Description |
|---|---|
| ERROR_FUNCTION_NOT_CALLED | Action not executed. |
| ERROR_SUCCESS | Completed actions successfully. |
| ERROR_INSTALL_USEREXIT | User terminated prematurely. |
| ERROR_INSTALL_FAILURE | Unrecoverable error occurred. |
| ERROR_NO_MORE_ITEMS | Skip remaining actions, not an error. |
Note that custom actions that are executable files must return a value of 0 for success. The installer interprets any other return value as failure. To ignore return values, set the msidbCustomActionTypeContinue bit flag in the Type field of the CustomAction table.
For more information about the msidbCustomActionTypeContinue option and other return processing options, see Custom Action Return Processing Options.
Note that Windows Installer translates the return values from all actions when it writes the return value into the log file. For example, if the action return value appears as 1 in the log file, this means that the action returned ERROR_SUCCESS. For more information about this translation see Logging of Action Return Values.
Related topics
Send comments about this topic to Microsoft
Build date: 2/3/2012
The include file msi.h and WinError.h from platform SDK's include directory contain the definitions of these constants.
WinError.h
...
//
// MessageId: ERROR_SUCCESS
//
// MessageText:
//
// The operation completed successfully.
//
#define ERROR_SUCCESS 0L
...
//
// MessageId: ERROR_NO_MORE_ITEMS
//
// MessageText:
//
// No more data is available.
//
#define ERROR_NO_MORE_ITEMS 259L
...
Msi.h
...
// --------------------------------------------------------------------------
// Error codes for installer access functions
// --------------------------------------------------------------------------
#ifndef ERROR_INSTALL_FAILURE
#define ERROR_INSTALL_USEREXIT 1602L // User cancel installation.
#define ERROR_INSTALL_FAILURE 1603L // Fatal error during installation.
...
#endif
...
#define ERROR_FUNCTION_NOT_CALLED 1626L // Function could not be executed.
...
Robert Flaming
Windows Installer Program Manager
Team Blog: http://blogs.msdn.com/windows_installer_team
Individual Blog: http://blogs.msdn.com/rflaming
- 12/3/2007
- Robert Flaming - MSFT
- 10/3/2011
- cristianomoreau