Enable/Disable Install button based on text box contents

Jul 20, 2015 at 4:32 PM
Hi...I have added a couple of additional text boxes to my Options screen and would like to disable the Install button if those text boxes are not completed.

What is the best approach to doing this? Is it even possible?
Jul 20, 2015 at 6:01 PM
There isn't anything built-in you would probably need to modify the extension code to support this. The licence checkbox code would be a good starting point.
Jul 20, 2015 at 7:48 PM

Thanks for your reply Nigel

Are you able to point me in the right direction for how to go about this? I am struggling to find a good tutorial on the Web.

I’ve downloaded the source code and can see a possible touchpoints in WixStandardBootstrapperApplication.cpp (Methods like OnClickAcceptCheckbox()), but I’m not sure how to go about building/integrating the modified code.


Jul 21, 2015 at 7:49 AM
You will need some code similar to this:
ThemeControlEnable(m_pTheme, WIXSTDBA_CONTROL_INSTALL_BUTTON, fAcceptedLicense);
I hope that helps.
Jul 21, 2015 at 8:15 AM

Yep that sounds similar to what I found in the CPP file I highlighted.

However, is there any documentation on the steps I need to perform to build the code and how to integrate it into my installer?


Jul 21, 2015 at 8:17 AM
No this is not documented. You would need to use the existing c++ as a reference.
Jul 21, 2015 at 8:24 AM

Am I trying to do something unusual here? I find the Burn UI extremely restrictive regarding being able to conditionalize features/controls etc

I see that you have built your own extension, so can you tell me the steps you followed?


Jul 21, 2015 at 8:30 AM
All I did was look at the existing code and add to it were appropriate, as it is c++ a good knowledge of that is required. If you don't know c++ I would recommend looking at the C# UI code in WiX but again it isn't well documented.
Jul 21, 2015 at 8:33 AM

I can get by C++’wise. Am I correct in saying if I rebuild the appropriate project I can simply drop my DLL overtop of the existing version installed as part of WIX Toolset binaries?


Jul 21, 2015 at 8:45 AM
You could do that but I would follow the method in the extended BA by creating your own file and referencing that instead.
Jul 21, 2015 at 3:57 PM

Ok I’m a bit resistant to making changes to the code as it’ll become a bit of a maintenance nightmare to keep up to date with other changes provided by WIX.

Guess I’m trapped. Burn does some good stuff, but seems to be missing fundamental things.

Thanks for your help