Detect if SQL Server 2008 is installed

I am using dotNetInstaller as a bootloader and I need to determine if SQL Server 2008 or higher is installed as a prerequisite.

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

If the value Versionis 10.0.0 or higher, it detects it as set. We tried the installation package on 10 machines here (Windows XP SP3 and Windows 7), and the prerequisite worked fine. We receive reports from many people who, although they have SQL 2008, do not detect the installation.

From the magazine:

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 final key to verify?

+3
3

, , , . : SOFTWARE\Microsoft\Microsoft SQL Server\100\Bootstrap Release\1033\CurrentVersion\Version

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

PatchLevel

, R2 R2 SP1.

+2

SQL Server 2008 Developer Edition, ? , "Microsoft SQL Server 2008 Redist", , .

+1

Source: https://habr.com/ru/post/1754839/


All Articles