如何(从安装程序)检测服务器中是否安装了 SQL 报告?
我正在开发一个 Windows Installer 项目(通过 InstallShield),该项目将使用 SQL Reporting Services 执行一些工作。
有谁知道检测目标计算机中是否安装了 SQL 报告服务的最安全方法是什么?
到目前为止我发现:
- 我可以检查 MSSQLSERVER 服务 或
检查注册表中是否有以下项:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0C270C59-8706-42B8-A2AD-6E5EE18BC90B}
我一直更喜欢使用注册表来查找已安装的内容,但我'我不确定在这种情况下这是正确的密钥。 (我知道搜索该特定注册表项只会匹配 SQL Server 2008 R2 Reporting Services,在我的情况下就可以了)。
注意:我倾向于使用注册表项搜索,但如果有人知道如何执行此操作,则使用 C# 代码的替代方法也可以。
I'm working on a Windows Installer project (via InstallShield) that will perform some work with SQL Reporting Services.
Does anybody know what is the safest way to detect if SQL Reporting services are installed in the target machine?
So far I've found that:
- I could check for the MSSQLSERVER service
or Check the registry for the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0C270C59-8706-42B8-A2AD-6E5EE18BC90B}
I've always preferred to use the registry in order to find something is installed, but I'm not sure this is the correct key in this case. (I'm aware that searching for that particular registry key would only match SQL Server 2008 R2 Reporting Services, which in my case would be fine).
Note: I'm leaning towards using the registry entry search, but an alternative method using C# code would be fine if someone knows how to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来最好的方法是通过自定义操作以编程方式执行此操作:
http://technet.microsoft.com/en-us/library/bb630446.aspx
您可以在此处找到自定义操作教程:
http://www.codeproject.com/KB/install/msicustomaction.aspx
请注意,只有 win32 DLL 和 VBScript 自定义操作可以设置安装程序属性。因此 .NET 安装程序类操作将不起作用。
It looks like the best approach is doing it programmatically through a custom action:
http://technet.microsoft.com/en-us/library/bb630446.aspx
You can find a custom action tutorial here:
http://www.codeproject.com/KB/install/msicustomaction.aspx
Please note that only win32 DLL and VBScript custom actions can set installer properties. So a .NET installer class action won't work.
您可以检查注册表项:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SSRS\MSSQLServer\CurrentVersion
这里描述了如何检查 SQL Server Reporting Services 是否通过实际安装程序安装:
https://www.actualinstaller.com/help/precessions.html
You can check the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SSRS\MSSQLServer\CurrentVersion
Here is described how to check if SQL Server Reporting Services is installed via Actual Installer:
https://www.actualinstaller.com/help/prerequisites.html