Check sql server express 2005 or 2008 is installed

  • 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?

  • 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

  • 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?

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply