I have an installer where the user enters the data source in the connection string (i.e. DataSource="machinename\instance").
Using C# given the machinename\instance string, I need know if the service name is MSSQLSERVER or MSSQL$SQLEXPRESS
On one particular machine we have SQL Server 2005 (full) and SQL Express 2008 installed.
The reason I need to know this is in our wix installer, the main application to be installed has a dependency on SQL server, so we need to have the correct dependency for it to be installed. The dependency could be on the service MSSQLSERVER or MSSQL$SQLEXPRESS and I can have both these services installed on a machine.
JD