SQL2012 LocalDB: how to check in c# if it is currently installed?

ZedZip picture ZedZip · Jul 24, 2012 · Viewed 10.7k times · Source

How to check in c# code if LocalDB currently installed? also, how to check if SQLNCLI11 presents in system?

Answer

ErikEJ picture ErikEJ · Jul 24, 2012

Check if LocalDB is installed, by looking for this registry key:

[HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\11.0]

SQLNCLI11 - check the file version and presence of this file: C:\WINDOWS\system32\sqlncli.dll