Home Forums Programming Connecting programatically find out is there''s a SQL installation RE: programatically find out is there''''s a SQL installation

  • Default Instance:

    Install Path: HKLM\Software\Microsoft\MSSQLServer\Setup\SQLPath

    If they are defined:

    Default Data File Path: HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\DefaultData

    Default Log File Path: HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\DefaultLog

    Named Instance:

    Install Path: HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>\Setup\SQLPath

    If they are defined:

    Default Data File Path: HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>MSSQLServer\DefaultData

    Default Log File Path: HKLM\Software\Microsoft\Microsoft SQL Server\<Instance Name>\MSSQLServer\DefaultLog

    K. Brian Kelley
    @kbriankelley