I need to add a test sql connection button in Wix. When the button is clicked, it can check if the sql connection can be establish. And if it fails it can pop up an error dialog and remain at the same page when the error dialog closes (and not exit the installation). May i know if there is a pre-existing wix command or custom action using command line that i can use. I'm trying not to accomplish this using writing my own custom action dll.
Thanks in advance.
You can use a session variable that will set if SQL connection fails and vice-versa. after that use SpawnDialog to show the pop-up dialog with error message. Example:
<Publish Event="SpawnDialog" Value="InvalidConn">DBCONNACCEPTED = "0"</Publish>
Here InvalidConn is a dialog
<Dialog Id="InvalidConn" Width="260" Height="120" Title="[ProductName]">
<Control Id="OK" Type="PushButton" X="102" Y="90" Width="56" Height="17" Default="yes" Cancel="yes" Text="OK">
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
<Control Id="Text" Type="Text" X="48" Y="22" Width="194" Height="60" Text="[ErrorText]" />
<Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="Information icon" FixedSize="yes" IconSize="32" Text="WixUI_Ico_Info" />
</Dialog>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With