Hi All,
I'm new to WiX, so the answer to this may be fairly trivial: I have created a dll with a method in it to validate that the sql details on the current UI form are valid. I have added a button "Test", with the idea that the following will occur: user clicks test the method in the dll is called, it sets a MSI variable "SQLCONNECTOK" to either 1 or 0, The next button is enabled/disable dependant on whether the SQLCONNECTOK value is 1 or 0. The thing is I don't know how to call this method via the button click. I have the following XML: <!-- Gets the SQL Server instance and the system administrator login --> <Dialog Id="DBServerDetailsDlg" Width="370" Height="270" Title="[ProductName] Setup"> <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}WTE Database Information" /> <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Enter the details for the SQL Server instance and administrator login." /> <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" /> <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /> <Control Id="SQLInstanceNameLabel" Type="Text" X="20" Y="60" Width="290" Height="13" Text="Name of the SQL Server Instance to use:" /> <Control Id="SQLInstanceNameCombo" Type="ComboBox" X="20" Y="72" Width="320" Height="18" Property="SQLINSTANCENAME"> <ComboBox Property ="SQLINSTANCENAME"> <!-- TODO: dynamically load this with valid sql instances --> <ListItem Value="test1" Text="1234"/> </ComboBox> </Control> <Control Id="LogonDetailLabel" Type="Text" X="20" Y="95" Width="320" Height="26" Text="Please enter a valid SQL Server administrator login to allow the installation to create your data within the specified SQL instance." /> <Control Id="SASQLUserNameLabel" Type="Text" X="20" Y="120" Width="290" Height="13" Text="SQL User Name:" /> <Control Id="SASQLUserNameEdit" Type="Edit" X="20" Y="132" Width="320" Height="18" Property="SASQLUSERNAME" Text="47"/> <Control Id="SASQLPasswordLabel" Type="Text" X="20" Y="155" Width="290" Height="13" Text="SQL Password:"/> <Control Id="SASQLPasswordEdit" Type="Edit" Password="yes" X="20" Y="167" Width="320" Height="18" Property="SASQLPASSWORD" Text="47"/> <Control Id="SASQLPasswordConfirmLabel" Type="Text" X="20" Y="185" Width="290" Height="13" Text="Confirm SQL Password:"/> <Control Id="SASQLPasswordConfirmEdit" Type="Edit" Password="yes" X="20" Y="197" Width="320" Height="18" Property="SASQLPASSWORDCONFIRM" Text="47"/> <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /> <Control Id="Test" Type="PushButton" X="80" Y="243" Width="56" Height="17" Text="Test"> </Control> <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next"> <!-- TODO: need to add a custom action here to ensure the instance is valid and that the login information can connect --> <!-- TODO: Need to check the user has selected and instance from the combo as well --> <!-- Only enable this control if the user has entered data in all the edits, this will change when we have a custom action to validate the connection data --> <Condition Action="enable"> <![CDATA[SASQLUSERNAME <> "" AND SASQLPASSWORD <> "" AND SASQLPASSWORD = SASQLPASSWORDCONFIRM ]]> </Condition> <!-- Otherwise disable it --> <Condition Action="disable"> <![CDATA[SASQLUSERNAME = "" OR SASQLPASSWORD = "" OR SASQLPASSWORD <> SASQLPASSWORDCONFIRM]]> </Condition> </Control> <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="Back" /> <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel"> <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> </Control> </Dialog> Any help would be greatly appreciated, and apologies if this has been answered in other posts, I just couldn't find it... Thanks Andrew If you've received this email by mistake, we're sorry for bothering you. It may contain information that's confidential, so please delete it without sharing it. And if you let us know, we can try to stop it from happening again. Thank you. We may monitor any emails sent or received by us, or on our behalf. If we do, this will be in line with relevant law and our own policies. Sage (UK) Limited. Registered in England at North Park, Newcastle upon Tyne, NE13 9AA. Registered number 1045967. ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users