1

What am I doing wrong here. I got this code from StackOverFlow thread but none of them works.

   <Property Id="SQLSERVER_INSTANCE">
      <RegistrySearch Id="SQLServerRegSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server" Type="raw" Name="InstalledInstances"/>
    </Property>
    <Feature Id="DatabaseFeature" Title="Database" Level="1" Display="expand">
      <Condition Level="0">
        <![CDATA[SQLSERVER_INSTANCE = ""]]>
      </Condition>
      <ComponentRef Id='SqlComponent' />
      <ComponentRef Id='cmpMDF' />
      <ComponentRef Id='cmpLDF' />
    </Feature>
Community
  • 1
  • 1
coder
  • 4,121
  • 14
  • 53
  • 88

2 Answers2

0

There is a difference in the SQL Server Registry Keys between 32-bit and 64-bit versions of Windows.

This is most likely the reason your WiX code is not working.

See this Blog for some comprehensive code snippets : http://robs-got-a-blog.blogspot.com/2011/08/detecting-sql-server-from-wix-installer.html

slagou
  • 318
  • 5
  • 10
-1

This works:

<Property Id="ISSQLSERVERSERVICEINSTALLED" >
  <RegistrySearch Id="IsSqlServerServiceInstalled" Root="HKLM" Key="SYSTEM\CurrentControlSet\services\MSSQLSERVER" Name="Description" Type="raw"/>
</Property>
coder
  • 4,121
  • 14
  • 53
  • 88
  • This doeinstasn't work for me. I have SQL Server installed and don't have this key. I have keys for individual instance names and SqlBrowser – Stealth Rabbi May 02 '13 at 21:21