February 11, 2013 at 5:21 am
I am creating an application which requires installation of sql server express 2005 or 2008 to work. So my application should check whether sql server is already installed on my customer PC and if it is not installed then i have to install it through my application. So how can i check sql server is installed or not in their PC? Any registry check method?
February 11, 2013 at 5:42 am
Hello,
Have a look at the services (Start>Run>Services.msc) running on the PC. It will show you if SQL is installed and is running or not.
Andrew
February 11, 2013 at 5:57 am
But i want to check sql is installed or not through code.So registry check or some other codes will be helpful.Anyone please come with a solution?
February 11, 2013 at 6:19 am
Have a look at this link (using C#):-
http://stackoverflow.com/questions/4276138/how-to-check-if-a-registry-value-exists-using-c
Registry values would be:-
HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion
February 11, 2013 at 6:20 am
what if they have 2008R2 or 2012 installed? 2005 is already eight years old...wow. keep in mind that official support from MS (end of life?) for that product is probably coming up soon.
this post over at another web site has some c# code for reading the registry for SQL instances:
http://bytes.com/topic/visual-basic-net/answers/750804-how-get-list-sql-server-instances
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply