SQL Express Prerequisite - 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!

laneerinc
Posts: 1
Joined: Fri Sep 15, 2006 8:10 am

SQL Express Prerequisite

I am using Advanced Installer Professional 4.3.
I need a way to definitively verify if SQL Express Edition has been installed as a prerequisite.

After much research I found this can be accomplished through a registry check as follows.

1.Loop through all sub-keys in “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\” for key names matching each instance value defined in “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\”. EXAMPLE: “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\”

2.If instance key is found then check the “EditionType” value under the “\Setup\” key for the value “Express Edition”. EXAMPLE: “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup\”

3.If an instance with an “EditionType” of “Express Edition” is found then SQL Express Edition has been installed, if not then it has not been installed.

My problem is that standard AI ‘Prerequisite>Install Conditions’ using “Registry Value” or “Registry SubKeys Enumeration” do not allow for this type of registry looping.

I can easily create a dll that can accomplish this and return a boolean, but I do not know how to tie the result code to the prerequisite?

Or maybe there is a way to accomplish this through AI directly, no dll or scripting required?

Any help would be appreciated.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The bootstrapper does not support such a complex search criteria nor does it allow determining the return value of a Prerequisite installation (this is already on our TODO list).

I believe that you should be able to check for SQL Server 2005 by using a Registry Value search criteria under the following key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion
Whether this is the Express edition or not should be of no importance.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”