I would like a C# sharp code to check if Microsoft SQL Server 05 or 08 is installed and then show as a result yes or no. I have seen that i can go through the registry but i am not certain as to the code...if there are other options i wouldnt mind either. thanks in advance for any help
C# to check if SQL server installed
Collapse
X
-
Tags: None
-
Have a look here...
http://msdn.microsoft.com/en-us/libr...gistrykey.aspx
You can use the RegistryKey class to work with the windows registry. Use the OpenSubKey method to open the key you want and then you can read the values stored there.
If you are going to do this, you need to make sure your program is running with administrator access. You might need to look into UAC stuff.
Comment