Is there anyway of telling if SSRS is installed on a machine using WIX? I can tell if SQL is instal开发者_如何学Cled but would also like to check for Reporting Services as well if possible.
You'll need to do some registry searching. I usually pull this logic into a custom action.
First open up this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS
It contains a mapping between all the externally used instance names (e.g. MSSQLSERVER for the default instance) and the internal names SQL uses (default for 2008R2 is MSRS10_50.MSSQLSERVER)
Then you can use the internal name to lookup setup information about the instance. For the default RS instance in 2008R2 this would be:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Setup
Here you will find all the info you should need. Version, edition, path on disk, configuration status, etc.
Note: If you are on a 64bit box you may also need to check for 32bit SQL installs under the Wow6432Node registry root
C# Reading the registry and Wow6432Node key
精彩评论