How to know the version and edition of SQL Server through registry search

假装没事ソ 提交于 2019-12-08 05:27:00

问题


I'm using below registry search to find out if MS SQL Server 2005 having an instance named XXX is installed or not.

<util:RegistrySearch Root="HKLM"
                Key="SOFTWARE\Microsoft\Microsoft SQL Server\XXX\MSSQLServer\CurrentVersion"
                Result="exists"
                Variable="SQLServer2005"
                Value="9.00.5000.00"/>

How can I search the MS SQL Server 2005 edition (developer,express etc) through registry search only?


回答1:


Use below code:

<Property Id="SQL_EDITION">
  <RegistrySearch Id="CheckSQLEdition" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\XXX\DTS\Setup" Name="Edition" Type="raw"  Win64="yes"/>
</Property>


来源:https://stackoverflow.com/questions/16709536/how-to-know-the-version-and-edition-of-sql-server-through-registry-search

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!