Reputation: 261
I'd like to show a messageBox in the setup.
Have how to put this messageBox into a Custom Action? Because I want to this messageBox appears when one condition is satisfied.
If isn't clear, please, let me know!
EDIT:
I want to make a script to verify if the .exe that I'm trying to execute it's already installed, if don't --> execute, else --> do nothing.
Upvotes: 0
Views: 2946
Reputation: 25945
My solution is w.r.t. Installshield 2014 but it is quite common use case to show an error message box during installation based on certain condition. So, this solution might help someone even in case you want to achieve it in an installshield version higher than Installshield 2009.
I achieved it through SpawnDialog
control event as discussed below. Let's say you have a dialog with <Back
, Next>
and Cancel
buttons. On the click of Next>
button you want to make some check e.g. whether a service is up and running or not.
If service is down then you might want to show an error dialog popup instead of moving to the next wizard step. So this is how you setup your Next>
button behavior as shown in the snapshot below:
Now you can notice the SpawnDialog
event. I've set it to SetupErrorNew
. What is SetupErrorNew
? SetupErrorNew
is also a dialog. I created it by cloning pre-existing SetupError
dialog template as shown in the snapshot below:
This dialog will show the error message that you desire. Few key things that we need to set on the new error message dialog SetupErrorNew
as below:
Error Dialog
property of the dialog to False
.argument
value of EndDialog
event to Return
as shown in the snapshot below:Upvotes: 1
Reputation: 67118
Use an InstallScript function, there you have a MessageBox().
Upvotes: 0