PDA

View Full Version : How to Launch Action from a Dialog?



bobinyec
01-14-2005, 09:01 AM
In the SetupCompleteSuccess dialog, I'm using the CheckLaunchProgram CheckBox to kick off the program which has been installed. The behavior of this button has been set to "DoAction", with the Argument being the name of the Custom Action that I have created. If I don't add this Custom Action to the Sequence, I get errors. If I do add it to the sequence, I don't know what conditions to give it so that it only runs when the button on the SetupCompleteSuccess dialog has been pushed. In fact, I don't see why I need to put this Custom Action in the sequence at all, since it is supposed to be controlled by the dialog. How do I need to set this up?

TsungH
01-14-2005, 10:56 AM
You will need to elaborate on the error message received, as well as on the custom action configurations.

bobinyec
01-14-2005, 11:08 AM
This error says that the operation is unable to be scheduled because the action must be scheduled between InstallInitialize and InstallFinalize.

Don't exactly know what you want as far as "configurations" go. The main thing is that the custom action is absent from all sequences.

bobinyec
01-14-2005, 12:05 PM
In The Official InstallShield for Windows Installer, by Bob Baker, it says (Chapter 11 - Creating and Using Custom Actions),

"Using the DoAction control event
One of the things you might want to do is launch a custom action with a button click. .... For this to work, this custom action has to be of the immediate category: it cannot be a deferred custom action."

Unfortunately, mine is a deferred custom action. What I want to do is to give the user a choice of starting the newly installed code. How should I do that?

RobertDickau
01-14-2005, 12:16 PM
Well, the UI sequence runs only in immediate mode, which is why an action launched by a DoAction control event has to use immediate mode, even if it runs after the deferred phase of the Execute sequence has finished...