All versions of SQL Server Registry Key

Is there a registry value that I can check to check if any version of SQL Server is installed? I want to check one value ... not a value for 2005, another for 2008, etc.

+3
source share
3 answers

I had the same problem. I do not think there is room for one stop for this.

What really complicates this is the concept of named instances - where you can have multiple versions of sql installed on the same computer.

For instance:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Inst1\MSSQLServer\CurrentVersion
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Inst2\MSSQLServer\CurrentVersion

For SQL 2008, at least you can list the list of instances on
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL

+5
source

What about

HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion
+2
source

, ( ) SQL Server 2008 SQL Server 2008 R2

0

Source: https://habr.com/ru/post/1728086/


All Articles