Determine if SqlLocalDB is installed

BennoDual picture BennoDual · Mar 18, 2013 · Viewed 7k times · Source

I am searching for a way to determine in WiX if SQLLocalDB is installed or not. How can I do this? - Can I check a registry-key? - When yes, which key?

Answer

Rob Mensching picture Rob Mensching · Mar 18, 2013

A RegistrySearch should do it:

<Property Id="LOCALDB">
   <RegistrySearch Id="SearchForLocalDB" Root="HKLM" 
                   Key="SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11E.LOCALDB\MSSQLServer\CurrentVersion"
                   Name="CurrentVersion"
                   Type="raw" />
</Property>

That would get you the version.