0

I am trying to create a bootstrapper with dotNetInstaller for my application which needs Microsoft SQL Server 2005 Backward Compatibility Components. I have added a check for that using the pre-built components.

All was good till I realized that I need to check for SQL Server 2008 installation before installing Microsoft SQL Server 2005 Backward Compatibility Components.

This is where I'm stuck, in microsoft's download page I double checked the system requirements for Microsoft SQL Server 2005 Backward Compatibility Components, which did not state that the machine requires SQL Server 2008 to be installed.

If it is required to install SQL Server 2008 for Microsoft SQL Server 2005 Backward Compatibility Components then I want to check whether SQL Server 2008 is installed, if not then skip the installation for Microsoft SQL Server 2005 Backward Compatibility Components and continue installation for my product.

Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125

1 Answers1

1

I haven't worked with dotNetInstaller yet, but you can get the current version of the installed SQL Server from the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup\CurrentVersion

If the entry is present, that would imply that SQL Server 2008 is installed.

If SQL Server 2008 is not installed, there should be no registry entry present. You might want to check what happens when you uninstall though. I don't know if the entry will still be present or not.

From some looking around, I think you can check registry values in dotNetInstaller with the check_registry_value install check.

Peter
  • 13,733
  • 11
  • 75
  • 122
  • What about SQL Server 2008 R2. After some fidgeting around I found something like `SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\SQLEXPRESS` whose value should be `MSSQL10_50.SQLEXPRESS`. Will this work? – Soham Dasgupta Apr 18 '12 at 12:20
  • Hm, not sure about SQL Express. But I would expect SQL Server 2008 R2 to also be under the registry key I mentioned, because this is still version 9.0. In the CurrentVersion key, there should be more info on what exact version it is (R2 or not, Service Packs,...). You can see info on versions of SQL Server here: http://support.microsoft.com/kb/321185 – Peter Apr 18 '12 at 12:43