Possible Duplicate:
How can I determine installed SQL Server instances and their versions?
i’ve been searching and cannot find a way to verify through the registry if the sql server is installed and at least is the 2008 one.
Because it seems that for every version they change something in the path or i just didn’t see it.
Thank You in advance,
Miguel Sousa
You can scan for instance names in the following key:
From there you can take each name and the data column (e.g. a named instance ‘SQL2008’ might say ‘MSSQL10.SQL2008’), and find the version by appending the instance identifier (‘MSSQL.SQL2008’) to this reg path:
In that key, there will be an entry called “CurrentVersion” and the data value will have the version #.
This will return a string like
11.0.2316.0. In this case you only really care about the characters before the second decimal. If this reflects 10.0 or greater, that’s SQL Server 2008 or greater (10.0 = 2008, 10.5 = 2008 R2, 11.0 = 2012). If this reflects 9.0 or less, that’s something before 2008 (9.0 = 2005, 8.0 = 2000, etc).