Disable Next button in CustomizeDlg - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

johndwill
Posts: 5
Joined: Sat Oct 20, 2007 2:11 am

Disable Next button in CustomizeDlg

Hi,

I'm using the standard CustomizeDlg and I'm wondering how I get the Next button to disable if the user has unselected all the features in the SelectionTree?

The Next button is subscribing to SelectionNoItems but that doesn't seem to be doing anything, even if I choose not to install the main feature.

My selection tree looks like:
Main Feature
- Child Feature 1
- Child Feature 2
- Child Feature 3

I'd like the Next button to disable if all Child Features are unselected.

Is there something else I should be doing?

Thanks
John
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm afraid that this cannot be done because you cannot update the value of the property which will determine if the button is disabled or enabled.

However, you can set the "Next" button to display a message and deny access to the next dialog if all the features are not marked for installation. For this you can use an Attached custom action which looks like this:

Code: Select all

Const msiInstallStateLocal  = 3
Const msiInstallStateSource = 4

If Session.FeatureRequestState("Feature_01") = msiInstallStateLocal Or Session.FeatureRequestState("Feature_01") = msiInstallStateSource Then
  Session.Property("ENABLED")="True"
Else  
  Session.Property("ENABLED")="False"
  MsgBox("The feature must be installed")
End If
This custom action is set as a "DoAction" Published control event for the "Next" button. If the feature with the "Identifier" field ("Organization" page) set to "Feature_01" is not marked for installation then the message box will be displayed and you will not be able to go to the next dialog.

You can modify this custom action for your features. For more information about custom actions you can see this page:
http://www.advancedinstaller.com/user-g ... -page.html

Also, you can read more about control events here:
http://www.advancedinstaller.com/user-g ... ditor.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”