Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Installer
Custom Actions
 Custom Action Return Values

  Switch on low bandwidth view
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 valueDescription
ERROR_FUNCTION_NOT_CALLEDAction not executed.
ERROR_SUCCESSCompleted actions successfully.
ERROR_INSTALL_USEREXITUser terminated prematurely.
ERROR_INSTALL_FAILUREUnrecoverable error occurred.
ERROR_NO_MORE_ITEMSSkip 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.

See Also

Error Codes
Logging of Action Return Values

Send comments about this topic to Microsoft

Build date: 6/25/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Constants are defined in msi.h and WinError.h from the Windows Platform SDK's Include directory      Robert Flaming - MSFT   |   Edit   |   Show History

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

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker