我使用dotNetInstaller作爲引導程序,我需要檢測是否安裝了SQL Server 2008或更高版本作爲先決條件。檢測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" />
有誰知道確切的鍵檢查?
SQL Server 2008 Express for all – 2010-07-19 14:38:52