Getting SQL Server instance name in WIX?

1.5k views Asked by At

Using WIX i would like to know what instance of SQL Server is installed on target machine. If installed, get the name and set it as one of the property value to be displayed in my custom dialog.

I am using the following code to find if SQL Server is installed and using SQLSERVER property to set the my control's value, but its coming up as empty:

<Property Id="SQLSERVER"><RegistrySearch Id="SQLServer" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server" Type="raw" Name="InstalledInstances"/></Property><Condition Message="Error: This application requires Microsoft SQL Server 2005/2008 to be installed. Please install Microsoft SQL Server 2005/2008 and run this installer again.">SQLSERVER</Condition>

Custom Dialog:

<Control Type="Edit" Id="txtInstanceName" Width="150" Height="15" X="22" Y="139" Property="SQLSERVER" Text="[SQLSERVER]" /> 

Can someone please guide me what am I doing wrong here? Thanks!

1

There are 1 answers

0
Paul On

It's a bug documented here: http://support.microsoft.com/kb/897026