检测是否安装了 SQL Server 2008

发布于 2024-09-10 00:23:41 字数 1826 浏览 8 评论 0原文

我使用 dotNetInstaller 作为引导程序,我需要检测是否已安装 SQL Server 2008 或更高版本作为先决条件。

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

如果 Version 的值为 10.0.0 或更高版本,则将其检测为已安装。我们在 10 台计算机(Windows XP SP3 和 Windows 7)上尝试了安装包,先决条件运行良好。我们从很多人那里得到报告,尽管他们安装了 SQL 2008,但没有检测到安装。

从日志中:

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 检查:

<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" />

有人知道要检查的明确密钥吗?

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

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

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.

From the log:

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 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

终止放荡 2024-09-17 00:23:41

我相信我使用的密钥只能检测工具是否已安装。我将使用此密钥: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

奢华的一滴泪 2024-09-17 00:23:41
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\Bootstrap\Setup

PatchLevel

似乎是更有可能的候选者,因为它已通过 R2 和 R2 SP1 安装进行更新。

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\Bootstrap\Setup

PatchLevel

Appears to be a more likely candidate as it's updated by both the R2 and R2 SP1 installations.

风轻花落早 2024-09-17 00:23:41

他们没有使用SQL Server 2008 Developer Edition,是吗? ?我认为密钥在“Microsoft SQL Server 2008 Redist”级别可能有所不同,但我没有在这里检查。

They're not using SQL Server 2008 Developer Edition are they? I think the key might be different at the "Microsoft SQL Server 2008 Redist" level, but I don't have it here to check.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文