This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Test for existence of SQL Server
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 01, 2010
06:45 PM
Test for existence of SQL Server
I have an installscript project which uses platform filtering = Windows Server 2003, and which tests for Microsoft SQL Server 2005 - and specifically the Reporting Services component - and if both are present, executes SQL and installs reports. Up until now I have relied on a RegDBGetKeyValueEx() search of the registry for "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server" containing InstalledInstances = MSSQLSERVER. This worked fine, but now we also need to support installs on Windows Server 2008 64-bit, and will be supporting both Microsoft SQL Server 2005 & 2008.
Is there a better way to test for the existence of MS SQL Server 2005 or 2008, including Reporting Services, on both 32-bit and 64-bit Windows Server 2003 & 2008?
Thanks,
Morgan
Is there a better way to test for the existence of MS SQL Server 2005 or 2008, including Reporting Services, on both 32-bit and 64-bit Windows Server 2003 & 2008?
Thanks,
Morgan
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 04, 2010
10:39 AM
Check out the REGDB_OPTIONS system variable.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 04, 2010
12:22 PM
hidenori wrote:
Check out the REGDB_OPTIONS system variable.
Thanks. This worked:
< RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
< sKey = "Software\\Microsoft\\Microsoft SQL Server";
< sValue = "InstalledInstances";
< nResult = RegDBGetKeyValueEx( sKey, sValue, nType, sData, nSize );
---
>
> if (SYSINFO.bIsWow64) then
> REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
> endif;
>
> RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
> sKey = "Software\\Microsoft\\Microsoft SQL Server";
> sValue = "InstalledInstances";
> nResult = RegDBGetKeyValueEx( sKey, sValue, nType, sData, nSize );
Morgan