Export (0) Print
Expand All
0 out of 5 rated this helpful - Rate this topic

Custom Action Type 19

This custom action displays a specified error message, returns failure, and then terminates the installation. The error message displayed can be supplied as a string or as an index into the Error table.

Source

Leave the Source column of the CustomAction table blank.

Type Value

Include the following value in the Type column of the CustomAction table to specify the basic numeric type.

ConstantsHexadecimalDecimal
msidbCustomActionTypeTextData + msidbCustomActionTypeSourceFile0x01319

 

Target

The Target column of the CustomAction table contains a text string formatted using the functionality specified in MsiFormatRecord (without the numeric field specifiers). Parameters to be replaced are enclosed in square brackets, […], and may be properties, environment variables (% prefix), file paths (# prefix), or component directory paths ($ prefix). If after formatting the string evaluates to an integer, that integer is used as an index into the Error table to retrieve the message to display. If after formatting the string contains non-numeric characters, the string itself is displayed as the message.

Return Processing Options

The custom action does not use any options.

Execution Scheduling Options

The custom action does not use any options.

In-Script Execution Options

The custom action does not use any options.

Return Values

See Custom Action Return Values.

Remarks

For example, the custom actions CAError1, CAError2, CAError3, and CAError4 return these messages.

CustomAction Table

ActionTypeSourceTarget
CAError119[Prop1]
CAError219Installation failure due to Error2.
CAError31925000
CAError419[Prop2]

 

Property Table

PropertyValue
Prop1"Installation failure due to Error1."
Prop2"25100"

 

Error Table

CodeMessage
25000Installation failure due to Error3.
25100Installation failure due to Error4.

 

These custom actions return the following error messages:

Custom actionReturned message string
CAError1Installation failure due to Error1.
CAError2Installation failure due to Error2.
CAError3Installation failure due to Error3.
CAError4Installation failure due to Error4.

 

Note that because the order of evaluation of launch conditions cannot be guaranteed by authoring the LaunchCondition table, you should use Custom Action Type 19 custom actions in your installation to evaluate conditions in a specific order.

Related topics

Custom_Actions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.