简体   繁体   中英

Using dotNetInstaller to check whether SQL Server 2008 is installed

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM