2012-07-25 79 views
1

我在這裏做錯了什麼。我從StackOverFlow thread得到了這段代碼,但它們都不起作用。如何檢查SQL Server是否安裝在wix 3.5

<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> 

回答

-1

這工作:

<Property Id="ISSQLSERVERSERVICEINSTALLED" > 
    <RegistrySearch Id="IsSqlServerServiceInstalled" Root="HKLM" Key="SYSTEM\CurrentControlSet\services\MSSQLSERVER" Name="Description" Type="raw"/> 
</Property> 
+0

這對我來說doeinstasn't工作。我安裝了SQL Server,並沒有此密鑰。我有個別實例名稱和SqlBrowser的鍵 – 2013-05-02 21:21:19

相關問題