Custom actions
Knowing what the standard actions do and when prepares you for what's next: making your own actions, called custom actions, and scheduling them appropriately.
Any custom action that changes the system, whether it be changing files, setting up databases, or adjusting user rights, should happen during the deferred stage of the Execute sequence. Otherwise, you're free to place them where you like during either the UI or Execute sequence.
Custom actions are declared with the CustomAction
element. Use its Execute
attribute to define how it should run and its Return
attribute to tell how its return status should be treated. For example, this would declare a custom action called MyAction
that runs during the deferred stage and is checked for success upon completion.
<CustomAction Id="MyAction" Execute="deferred" Return="check" ... />
That's the basics, although there are seven specific types of custom actions that each add their own necessary attributes. We'll cover each of...