简体   繁体   中英

Wix: Determine if SqlLocalDB is installed

I'm trying to determine is it LocalDb installed and i tried to go the way from this link Determine if SqlLocalDB is installed

But i've got an error on my log file that: Registry key not found. Key = 'SOFTWARE\\Microsoft\\Microsoft SQL Server\\MSSQL12E.LOCALDB\\MSSQLServer\\CurrentVersion'

My code is:

<util:RegistrySearch Id="SearchForLocalDB" 
               Root="HKLM"
               Key="SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12E.LOCALDB\MSSQLServer\CurrentVersion"
               Value="CurrentVersion"
               Variable="LocalDBVersion" 
               Result="value"/>
<PackageGroup Id="LOCALDB">
  <MsiPackage  Id="LOCALDB"
              DisplayName="Microsoft SQL Server 2014"
              Permanent="yes"
              Visible="yes"
              DisplayInternalUI="yes"
              SourceFile=".\SqlLocalDB.msi"
              InstallCondition="(LocalDBVersion &lt;= &quot;12.0&quot;)"
    />
</PackageGroup>

Use Result='exists' rather than pulling the actual value. You already have the version in the key value so you don't need to check for it in the InstallCondition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM