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