MSI does not support directly support what you are trying to do with text 
boxes.  You can do this sort of thing with radio buttons and check boxes as 
they cause the MSI engine to evaluate the dialog when used.  A text box or 
other text controls do not cause this behavior so your button will remain 
disabled until the dialog is refreshed (hitting the back or cancel buttons).  

You will need to leave the next button active and put a custom action on the 
next button that will validate that the text box if filled properly.  You then 
control moving forward in the installation by setting a property if all is 
well.  You can then use this property to control the forward movement of the 
install.

On a side note, if you have seen this behavior it was probably a wrapper over 
the install.  You can do this type of action in C# or other programming 
languages, but not directly in MSI.

Mat Skildum

________________________________________
From: Ravi Raj [raviraj.callin...@gmail.com]
Sent: Monday, January 23, 2012 1:18 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Disable Next Button When TextBox is Empty

Hi,
I am implementing a textbox control having value fetched from registry
(after LicenseAggrement dialog). When registry has some value, the control
works fine but when delete the text in the textbox, the Next button does
not disable. But when I click on some other button (like back or cancel),
the control works then. Same thing happens when I enter some text in
textbox, Next remains disabled till I click some other button. How can I
make this work correctly in real time?
Code for Next Button is here:

*<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.ButtonText_Next)"><Condition
Action="disable"><![CDATA[SDK_MACHINE = ""]]></Condition><Condition
Action="enable">SDK_MACHINE &lt;&gt; ""</Condition><Publish
Event="NewDialog" Value="VirtualizationDlg">1</Publish></Control>*

and for textbox is:

*<Control Id="MSNameEdit" Type="Edit" X="25" Y="105" Width="220"
Height="18" Property="SDK_MACHINE" />*

SDK_MACHINE property:

<Property Id="SDK_MACHINE"              Secure="yes">
<RegistrySearch Id="sdk_Machine"                      Root="HKCU"
                Key="Software\.....\.....\....."
Name="MachineName"                      Type="raw" />    </Property>


--
Thanks and Regards,
Ravi Raj
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to