How to sequence a custom action script after a specific dialog?

1.5k views Asked by At

I have created a basic MSI project using InstallShield, I want to run a custom action script between two dialogs.

This shows my execute sequence, I want to move the custom action MyCustomActionScript to between the two dialogs indicated by the arrow.

enter image description here

How can I do this? Do I need to change things around somehow so that the dialogs are not nested (this is the way they are created naturally)? Or do I have to do something else, like run a DoAction on the target dialog? If so, will the execute sequence automatically move to the next dialog upon completion of the script, or do I have to script something to move the execution?

(Note that the script is a simple manipulation of the INSTALLDIR property, nothing complicated.)

2

There are 2 answers

0
Christopher Painter On

Only the first dialog of the wizard loop is in the UI sequence. The rest are invoked by NewDialog control events. You want to look into the DoAction control event to invoke your custom action.

Custom actions scheduled in this fashion should only perform data acquisition / validation. Changes to the machine state should only occur in the execute sequence.

0
Michael Urman On

To run an action between LicenseAgreement and InstallSettings, you must indeed set up a control event DoAction. In this case you would add the DoAction on the behavior of LicenseAgreement's Next button so that it is invoked in the same scenarios that the Next button's NewDialog takes you to InstallSettings.