r00t
Posts: 28
Joined: Thu Jan 26, 2012 7:03 pm

How to disable 'Next' button if no feature is selected ?

I've 3 features: Feature1,Feature2,Feature3.
from a 'ConfigureDlg', the user chooses what feature(s) he wants to install.
my question is, how do i Disable the 'Next' Button if no feature is selected, and Enable it if One or more are selected ?
Thanks.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to disable 'Next' button if no feature is selected ?

Hello,

Unfortunately, you cannot have this scenario due to Windows Installer limitation.
As a workaround, you can have a custom dialog where you can add a check box for each feature ( you should also rename its “Property Name” to something meaningful e.g. F1_INSTALL etc).
Then you can use the control condition to enable the [Next] button when a check box is selected, something like:
  • Enable the [Next] button:
    Condition field: F1_INSTALL
    Action field: Enable
  • Disable the [Next] button:
    Condition field: Not F1_INSTALL
    Action field: Disable
Now you can go in the Organization page, and select for each feature the “Install based on condition” option from the “Installation Behavior” panel. You can use as a condition the property of the check box assigned to the related feature.
You can also take a look on Show a custom feature selection dialog article which may be useful to you.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”