Thursday, March 22, 2012

Detecting Feature Pack components on a SQL Server server

We have a product that uses, and will bootstrap, several of the feature pack components when it is installed (xmo, MSOLAP9, etc). However, if our product is installed on a machine that has SQL Server 2005 already installed, all of the feature pack components will have been installed as part of the server install, so we don't want to bootstrap them in that case. Is there a good way to detect this case? Clearly, simply checking that the feature pack MSI hasn't been installed isn't good enough, since SQL Server has its own MSIs that are different from the FP MSIs.

Can you try to check the registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server or use WMI to detect the SQL Server 2005 components? WMI should be a better choice.

|||

I'm not sure that would be wise in that case, since if SQL Server 2005 was removed it would break your application. You are best off to install the MSIs all the time, and to use the product ref-counting mechanism available in the redists to make sure they won't be removed unless your application has been. This is done by running the redist MSIs with the APPGUID property set on the command line, with the value of the property being the product code of your application that is being installed. What this will do is block the user from uninstalling those applications until your product has been removed first.

No comments:

Post a Comment