Enable/Disable Install button based on text box contents

Jul 20, 2015 at 3: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?
Coordinator
Jul 20, 2015 at 5: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 6: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.

Thanks

Coordinator
Jul 21, 2015 at 6: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 7: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?

Thanks

Coordinator
Jul 21, 2015 at 7:17 AM
No this is not documented. You would need to use the existing c++ as a reference.
Jul 21, 2015 at 7: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?

Thanks

Coordinator
Jul 21, 2015 at 7: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 7: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?

Thanks

Coordinator
Jul 21, 2015 at 7: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 2: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