sql-serverregistrykey

SQL Server Instances Registry Key


I made an application to bring the SQL server instances that exists on the local machine, and I font there is a value at the registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server"  the value "InstalledInstances" brings all the instances that are downloaded on the local machine, but the question here is that, does this key and this value works, or contains the instances for all SQL server versions, in other word is this key supports all versions of SQL servers(2008 ...etc.) ? I already tried it on SQL 2014 and 2012 and it already contained their instances, but is that applicable for versions below as well? (at least until SQL server 2008)

Thanks 


Solution

  • The answer for this question is here, and says:

    Yes, InstalledInstances under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\ contains all names of installed instances on this computer(not including localdb). This does applies to all SQL Server versions since 2008, and according to current information it also applies to SQL Server 2017(based on CTP 2.1).