检测是否安装了SQL Server 2008 [英] Detecting if SQL Server 2008 is installed

查看:188
本文介绍了检测是否安装了SQL Server 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 dotNetInstaller 作为引导程序,并且我需要检测是否已安装SQL Server 2008或更高版本作为前提条件.

I am using dotNetInstaller as a bootstrapper and I need to detect if SQL Server 2008 or above is installed as a prerequisite.

当前,我正在使用此注册表来检测安装: HKLM\SOFTWARE\Microsoft\Microsoft SQL Server 2008 Redist\SharedManagementObjects\1033\CurrentVersion\Version

Currently I am using this registry to detect the installation: HKLM\SOFTWARE\Microsoft\Microsoft SQL Server 2008 Redist\SharedManagementObjects\1033\CurrentVersion\Version

如果Version的值是10.0.0或更高,它将检测为已安装.我们在此处的10台计算机(Windows XP SP3和Windows 7)上尝试了安装软件包,并且前提条件可以正常工作.我们收到了很多人的报告,尽管他们已经安装了SQL 2008,但是它无法检测到安装.

If the value of Version is 10.0.0 or higher it detects it as installed. We tried the installation package on 10 machines here (Windows XP SP3 & Windows 7) and the prerequisite worked fine. We are getting reports from a lot of people that although they have SQL 2008 installed it does not detect the install.

从日志中:

2010-07-13 09:33:49 Checking whether registry value 'SOFTWARE\Microsoft\Microsoft SQL Server 2008 Redist\SharedManagementObjects\1033\CurrentVersion\Version' exists
2010-07-13 09:33:49 Opening 64-bit registry view (KEY_WOW64_64KEY)
2010-07-13 09:33:49 *** No registry key found: SOFTWARE\Microsoft\Microsoft SQL Server 2008 Redist\SharedManagementObjects\1033\CurrentVersion\Version, default value: false
2010-07-13 09:33:49 -- Microsoft SQL Server 2008 R2 x86 (Microsoft SQL Server 2008 R2 x86 Express): NOT INSTALLED

dotNetInstaller检查:

dotNetInstaller Check:

<installedcheck type="check_registry_value"
                                            rootkey="HKEY_LOCAL_MACHINE"
                                            path="SOFTWARE\Microsoft\Microsoft SQL Server 2008 Redist\SharedManagementObjects\1033\CurrentVersion"
                                            fieldname="Version"
                                            fieldtype="REG_SZ"
                                            fieldvalue="10.0.0"
                                            comparison="version_ge"
                                            wowoption="WOW64_64"
                                            defaultvalue="False"
                                            description="Installed Check" />

有人知道确定的密钥吗?

Does anyone know the definitive key to check?

推荐答案

我相信我使用的密钥只能检测是否安装了工具.我将使用此键:SOFTWARE\Microsoft\Microsoft SQL Server\100\Bootstrap Release\1033\CurrentVersion\Version

I believe the key I was using only detects if the tools are installed. I'm going to use this key: SOFTWARE\Microsoft\Microsoft SQL Server\100\Bootstrap Release\1033\CurrentVersion\Version

这篇关于检测是否安装了SQL Server 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆