Hello,
in my installer, I create a new Prerequisite for the "SQL Server 2012 Shared Management Objects". Everything works fine, I check "Download single file from URL" und enter the URL of the Microsoft donwload page.
But I've got a problem with the install condition. I want the check, if SMO is already installed. After a short web search, I found some hints to check the registry key "HKEY_CLASSES_ROOT\Microsoft.SqlServer.Management.Smo.Database". But this key doesn't exist on any tested OS (Vista, 7, ...). Maybe this only works for older editions of the SQL Server (2005, 2008, ...) but not for 2012.
So I search the registry by myself and found another key "HKEY_CLASSES_ROOT\Installer\Assemblies\Global" with some REG_MULTI_SZ:
- Microsoft.SqlServer.Smo,fileVersion="10.0.5500.0",version="10.0.0.0000",culture="neutral",publicKeyToken="89845DCD8080CC91",processorArchitecture="MSIL"
- Microsoft.SqlServer.Smo,fileVersion="10.50.2500.0",version="10.0.0.00000",culture="neutral",publicKeyToken="89845DCD8080CC91",processorArchitecture="MSIL"
- Microsoft.SqlServer.Smo,fileVersion="11.0.2100.60",version="11.0.0.00000",culture="neutral",publicKeyToken="89845DCD8080CC91",processorArchitecture="MSIL"
- Microsoft.SqlServer.Smo,fileVersion="11.0.3000.0",version="11.0.0.0000",culture="neutral",publicKeyToken="89845DCD8080CC91",processorArchitecture="MSIL"
How can I check, if one of them has a version > 11?
Maybe there are another possibilities to check if SMO is installed. Please try this (Windows 7):
- open you Windows Explorer
- navigate to C:\Windows\assemblies
- here you can see a great list with all assemblies including "Microsoft.SqlServer.Smo" in version 10 and 11.
But I don't know how to use this information inside the installer. I try to create an install conditions with the criteria "File Version" und enter "[WindowsFolder]\assemblies\Microsoft.SqlServer.Smo" but no success. I think the problem is, that this file doesn't exists. Please open the Command-Utility (run -> cmd) and navigate to this folder, here you can see another structure: subfolders for GAC, GAC_32, GAC_64, ... but not the assembly "Microsoft.SqlServer.Smo".
Thanks for you help!
Manfred
FOLLOW US
Get the latest news in Application Packaging