how can i check whether sql server 2008 is installed or not in C# .net window application ??

i am creating C#.net window application , in my application i want to check whether sql server 2008 is installed or not (when my application start) ??

and if sql server 2008 is not installed in my system then it will give appropriate message , but how can i do this ?
Parth48Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
rawinnlnx9Connect With a Mentor Commented:
http://stackoverflow.com/questions/1221503/detect-local-sql-server-installation-with-c32-bit-as-well-as-64-bit

The above has many different examples and I bet the registry check should work fine for you.
0
 
Parth48Author Commented:
i want to check it when my application start and check it through C# coding ....
0
 
cubaman_24Commented:
Hello:
You have to choices from my point of view.
One is searching in windows registry.  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100.
Another choice, more complex maybe, is adding a launch condition to your msi installation, in case you have one.

Best regards.
0
 
Parth48Author Commented:
hi @rawinnlnx9:-

i got the below error , what can i do ?

"The type 'Microsoft.SqlServer.Management.Common.IAlterable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'."
0
 
Parth48Author Commented:
where i can download Microsoft.SqlServer.Management.Common dll ??
0
All Courses

From novice to tech pro — start learning today.