Problem detecting SQL Server 2008 Express R2 - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

t-grant
Posts: 3
Joined: Thu Jun 09, 2011 2:32 am

Problem detecting SQL Server 2008 Express R2

I'm having a problem with the install condition(s) that Advanced Installer uses to detect SQL Server 2008 Express R2.
It's looking for either:

Code: Select all

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Native Client 10.0\CurrentVersion\Version
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server 2008 Redist\SQLNCLI10\1033\CurrentVersion\Version[/b] 
The problem is that a user that has installed SQL Server Management Studio will have this same Native Client and fool my installer into thinking the engine is installed. It's not uncommon to have one (SSMS) without the other (SS). It's also not unusual to have mismatched, or even multiple versions of them installed on a same machine.
I see two keys that might tell me that some version of the SQL engine is installed, but they won't tell me which version it is:

Code: Select all

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\RefCount\sql_engine_core_shared
The only way that I can think of would be to search for an database instance name that starts with "MSSQL10_50" like:

Code: Select all

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER
However, I'm not seeing how to do a wildcard search of a registry key in AI.
Is there a better condition I could use?
Thanks,
Tom
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem detecting SQL Server 2008 Express R2

Hello Tom and welcome to the Advanced Installer Forums,
However, I'm not seeing how to do a wildcard search of a registry key in AI.
Here is a thread that discusses this.
Is there a better condition I could use?
You can add another search in the list besides the two predefined ones. This search should represent a value from SQL Server 2008 Express R2 installation only. Thank you for bringing this to our attention, we will try to improve this for a future release.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
t-grant
Posts: 3
Joined: Thu Jun 09, 2011 2:32 am

Re: Problem detecting SQL Server 2008 Express R2

Ok, I've spent an hour reading the Users Guide, Tutorials and searching this forum. For the life of me I cannot find any examples that show how to do wildcard file searches, or how to use an Application search as a prerequisite criteria.

In an attempt to find if any R2 database instances exist, such as:
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER
I created a Folder Search for:

Code: Select all

[ProgramFiles64Folder]Microsoft SQL Server\MSSQL10_50*
But it never finds anything. I give up, what is the correct syntax for a wildcard folder search?

And once I get that to work, how do I use it as my prerequisite criteria?
Thanks,
Tom
BTW, I'm using AI Professional 8.0.2
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Problem detecting SQL Server 2008 Express R2

Hi Tom,

I'm afraid that this type of wildcards are not supported. The thread Mihai mentioned discusses a wildcard alternative: multiple searches which use the OR operator.
However, you can try using this registry value as a detection criteria:

Code: Select all

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server 2008 R2\DisplayName
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
t-grant
Posts: 3
Joined: Thu Jun 09, 2011 2:32 am

Re: Problem detecting SQL Server 2008 Express R2

Great find on that registry key Cosmin. That works perfectly.
Thanks!

Return to “Common Problems”