CarlEMac2008
Posts: 17
Joined: Tue Apr 29, 2008 7:12 pm

Validating Feature Selection before Proceeding

Hi All,

I'd like to warn the user when they make feature-selections that don't make sense, but permit them to do so anyway. I'm hoping that it's not horribly difficult to process the user's customized feature-set on the "Next" button click to pop-up a message and potentially "Back"-up if the user rethinks better. A custom action that fails would fail the installation - I don't want that...

BTW, I'm using the "Java" license type - does this sort of thing require Enterprise kitchen-sink/bells-whistles functionality?

TIA,

Carl <|};-)>
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Validating Feature Selection before Proceeding

Hi Carl,

This can be done only in an Enterprise project by using these steps:
- go to the Custom Actions page and create a new "ScriptInline" custom action under "UI Custom Actions"
- select the custom action and in the Custom Action Properties page set the "Script text" field to:

Code: Select all

MsgBox "Incorrect feature configuration"
- you can change the text shown by the message box to what you want to show to the user
- go to the Dialogs page and add the "SetupTypeDlg" dialog
- click the plus sign ('+") next to "SetupTypeDlg" to show the dialogs which come after it
- select the "Next" button on the "CustomizeDlg" dialog
- add this control event:

Code: Select all

DoAction         ScriptInline         1 AND &MainFeature=3
- modify the "NewDialog" control event to look like this:

Code: Select all

NewDialog         VerifyReadyDlg         ((NOT Installed) OR (InstallMode = "Change")) AND &MainFeature<>3
Basically, you will show a custom message to the user (the DoAction control event) and stay on the same dialog (the NewDialog control event) if the feature "MainFeature" is marked for installation (&MainFeature=3). You can adapt this example to the feature combinations you need.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Validating Feature Selection before Proceeding

Is there a newer way to accomplish this without using VBScript?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Validating Feature Selection before Proceeding

Hi Scott,

Yes, this can be achieved without using VBScript. Just the "Display message box" predefined custom action instead of the VBScript code and set the appropriate conditions for it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”