Share via


Designing Better Setups: Enrich Your Custom Actions with Custom Error Messages

Windows Installer Error Messages [Windows Installer] describes the standard and debug errors from the Windows Installer engine. Error Table [Windows Installer] describes how a package can customize the these standard and debug error messages. The Error table topic also mentions "The range from 25000 to 30000 is reserved for errors from custom actions. Authors of custom actions may use this range for their custom actions.". As with quality applicaiton coding, all custom actions should return meaning full error messages to their callers.

Returning Error Messages from Custom Actions [Windows Installer] describes the way to use the error table range reserved for custom actions. This behavior involves using MsiProcessMessage (3 Parameters) function [Windows Installer] as does most instances of Sending Messages to Windows Installer (Using MsiProcessMessage).

Error messages that travel through the error table are distinct from the Custom Action Return Values [Windows Installer]. Custom Action Return Values [Windows Installer] is targeting the The return Statement (C/C++ Languages) and it’s peer’s in the other available custom action languages. Examples of using the Custom Action Return Values [Windows Installer] in a VSD MSDN topic Error Handling in Custom Actions.