I am using WiX and want to know if we can disable a control in a built-in dialog. My requirement is to disable the "Browse" button in the "CustomizeDlg".Answer1:
This became too long for a comment. I might "evolve" it as an answer if we get more information about your scenario. Just a couple of heads-ups for you.
If you are trying to prevent the setup from being installed to a non-standard path, then you should account for the fact that the installation directory can be set at the
msiexec.exe command line when the setup is installed in silent mode. <a href="https://stackoverflow.com/a/8841965/129130" rel="nofollow">Sample</a> (untested by me - first thing I found :-) ).
I suppose a custom action could be used to abort the setup if it is installed in silent mode to a non-standard path? An immediate mode custom action before
InstallInitialize somewhere I guess, but after costing actions (
InstallValidate, etc...) - but frankly, why do this? Perhaps you could illuminate your use-case?
Oh, and please don't leave the standard action
RemoveExistingProducts to run before your custom action (in the
InstallExecuteSequence). This would remove the existing, related installation on the box (if any) and then abort the major upgrade operation leaving no install left on the box.
And don't add your custom action to the user interface sequence - there is no need. This sequence is entirely skipped in silent installation mode, and if there is no way to set a custom path in the GUI, it can't be changed there anyway (and the InstallExecuteSequence's custom action would catch any changes should they be set anyway - it will do).Answer2:
Per <a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Mondo-UI-browse-button-disabled-td699237.html" rel="nofollow">this thread</a> which discusses how to enable the button, what you need to do is the reverse: ensure your <a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Mondo-UI-browse-button-disabled-td699237.html" rel="nofollow">
Feature elements</a> do not specify a <a href="https://stackoverflow.com/questions/24825154/what-is-the-meaning-of-wix-configurable-directory" rel="nofollow">
ConfigurableDirectory</a>, or that it is not public by using some lowercase letters in the identifier.