Link to home
Start Free TrialLog in
Avatar of Parth48
Parth48Flag for India

asked on

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 ?
Avatar of Parth48
Parth48
Flag of India image

ASKER

i want to check it when my application start and check it through C# coding ....
ASKER CERTIFIED SOLUTION
Avatar of rawinnlnx9
rawinnlnx9
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of Parth48

ASKER

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'."
Avatar of Parth48

ASKER

where i can download Microsoft.SqlServer.Management.Common dll ??