问题
My application needs SMO libraries to be installed. I want my installer to verify if SQL Server 2008 Management Objects already installed and if not install the SMO feature pack bundled with my installer. How do I find out if it is already installed? Is there any registry key to verify?
Thanks, Hem
回答1:
Solution for SQL Server 2012:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\SharedManagementObjects\CurrentVersion\Version
You can check if this key exists (and check if the value is greater than 11).
回答2:
I think the registry key for SMO is located at HKEY_CLASSES_ROOT\Microsoft.SqlServer.Management.Smo.Database
. You could probably check to see if this key exists and install the Feature Pack if it's not there. Take a look here and see if it helps you?
来源:https://stackoverflow.com/questions/8502047/how-to-find-if-sql-server-2008-management-objects-installed