Execute a Custom Action from User Interaction in InstallShield (Basic MSI Project)

GNat picture GNat · Apr 17, 2012 · Viewed 9.7k times · Source

I am using InstallShield 2012 Professional to create a basic MSI project. My question involves how to execute a Custom Action caused by user interaction with a dialog.

I've been doing the research but I just am not getting the right combination of settings to make it work. I have gotten the Custom Action to execute, but before it even gets the user interaction.

After installation is complete, and the standard "SetupCompleteSuccess" dialog shows, I added a checkbox so the user can choose to view some html release notes when they click on the finish button in addition to launching the program. The program launch works perfectly and was set up in the project assistant wizard.

Checkbox setup in dialog

In the dialog, I set the checkbox to set the property LAUNCHRELEASENOTES to 1. In the dialog behavior I set a DoAction in the Finish (aka OK) button to execute the custom action "OpenReleaseNotes" if the condition LAUNCHRELEASENOTES=1 is true.

Button behavior.

In the "OpenReleaseNotes" custom action I created, where I am probably messing up the recipe, I am making it Launch an Executable (in this case cmd.exe just to call a DOS command) to open the html release notes. I am completely unclear on what combination of settings in the custom action need to be set up to have it executed by user interaction at the very end of the install.

Custom Action

How should these be set for the custom action?

  • Return Processing
  • In-script Execution
  • Execution Scheduling
  • Install UI Sequence
  • Install Execute Sequence
  • Install Execute Condition (if applicable)

Answer

Christopher Painter picture Christopher Painter · Apr 17, 2012

ControlEvents have an order of operations. Right click the "EndDialog" control event and select move down to get it to execute after your custom actions.