I do something very similar in some of our installs. What I do is on the Next button I run my CA that validates the data, in this case a database connection string. If it's valid it moves on to the next dialog. If the connection cannot be validated a SpawnDialog event is triggered to display the SQL error, leaving them on the same dialog.
Here are the relevant WiX pieces, slightly edited to remove additional dialog flow conditions, etc that do not apply here. <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next"> <Publish Event="DoAction" Value="VerifyDbConnection" Order="1"> <![CDATA[1]]> </Publish> <Publish Event="SpawnDialog" Value="DatabaseErrorDlg" Order="2"> <![CDATA[VALID_DB_CONN=0]]> </Publish> <Publish Event="NewDialog" Value="YourNextDlg" Order="3"> <![CDATA[VALID_DB_CONN=1]]> </Publish> </Control> <!-- Database Connection - Custom Error dialog --> <Dialog Id="DatabaseErrorDlg" Width="300" Height="125" Title="[ProductName] Setup"> <Control Id="Error" Type="Text" X="20" Y="15" Width="270" Height="25" Transparent="yes" NoPrefix="yes" Text="SQL Connection Failed:" /> <Control Id="ErrorText" Type="Text" X="20" Y="40" Width="270" Height="60" Transparent="yes" NoPrefix="yes" Text="[DATABASE_CONNECTION_ERROR]" /> <Control Id="OK" Type="PushButton" X="230" Y="95" Width="40" Height="17" Text="OK"> <Publish Event="EndDialog" Value="Return" /> </Control> </Dialog> -Mike -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/NEXT-button-behavior-tp5163545p5164284.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users