cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BobR69
Level 2

Fail custom action without failing installation

I have a dialog in my installation where a user enters a value into an edit box. When the user clicks the Next button, it calls a Custom Action (which is an InstallScript function) that does some validation and lookup on the value entered.

What I would like to do is prevent the user from leaving the dialog if the value does not validate correctly in the script. However, if I have the script return "-1", the installation fails completely.

What's the best way to approach this?

Additionally, I would like the Next button to be disabled until the user types at least one character into the Edit box, but the box doesn't seem to generate any trappable events (unless I am missing something).

Any help is appreciated...
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

I believe common practice is to have the action set a property value indicating whether the validation succeeded, and then to condition the NewDialog control event based on that property. (The order of control events is significant, so you might need to use the Move Up and Move Down commands to get the order to work.)
0 Kudos
BobR69
Level 2

ok - that seemed to work. Thanks!
0 Kudos