jrahma
Posts: 51
Joined: Wed Jan 07, 2009 11:56 am

add SQL Server Express

How can I add SQL server express to my setup application and speceify the instance within the setup?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: add SQL Server Express

Hi,

For this you can use a prerequisite. Please note that the User Guide contains a prerequisite tutorial which may help you. Advanced Installer has predefined prerequisites for SQL Server Express, so you can use them instead of creating new ones. After the prerequisite is created, you can use its command line to pass parameters to it.

For more details about SQL Server installation with a custom command line please see this page:
http://msdn.microsoft.com/en-us/library/ms144259.aspx

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dpaille
Posts: 5
Joined: Wed Jan 21, 2009 8:07 pm

Re: add SQL Server Express

I am trying to install SQL Express 2008 using the Configuration File. The Syntax that works at the command line is 'setup /ConfigurationFile=<inifile.ini>'

I have tried putting "/ConfigurationFile=<inifile.ini>" in the Command line section as well as "ConfigurationFile=<inifile.ini>" and "setup /ConfigurationFile=<inifile.ini>" and they all give me the following error:

The loading and initialization of 'setup.rll' failed with error code: 0x80070002.
SQL Server Setup will now exit.

Any ideas?
Thanks,
Dom
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: add SQL Server Express

Hi Dom,

A correct command line for the prerequisite should look like this

Code: Select all

/CONFIGURATIONFILE="<inifilepath>"
The error you are encountering may be caused by one of the following:
1) The SQL Server installation file is corrupt. In this case you can try downloading it again from Microsoft.
2) The INI file is not found. In this case you can try including all the files in the EXE bootstrapper.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dpaille
Posts: 5
Joined: Wed Jan 21, 2009 8:07 pm

Re: add SQL Server Express

The SQL Server installation file is not corrupt because I can successfully install it from the command line. I agree that the .ini file is not being located but I need a bit more information on how AI passes the switches to the .exe. I guess I could create a batchfile and use that to install the SQL Server, but that is kind of getting away from using the application in the first place.
dpaille
Posts: 5
Joined: Wed Jan 21, 2009 8:07 pm

Re: add SQL Server Express

Well that did not work. Apparently a Batch file is not a supported extension in the "Software Prerequisites" tab. Anybody have any ideas?
stevehiner
Posts: 9
Joined: Fri Jan 07, 2005 6:42 pm
Contact: Website

Re: add SQL Server Express

I've noticed that the prerequisite included only detects the version of the default instance. My laptop has SQL Server 2000 and 2005 installed. The prereq check finds version 8.0 in the registry and reports that the prereq isn't met. It turns out the version 9.0 registry value is buried in a key named after the instance name. That instance name is in a key in a known location.

Would it be possible in the prereq system you have set up to have it pull the instance name out of the registry then use that value to look up another key in the registry to find out the instance version numbers? What if there are more than one named instance, can it do this in a loop of some sort?

I realize that 99% of systems either won't have SQL at all or they will only have one instance but I thought I'd ask.

Steve
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: add SQL Server Express

Hi Dom,

The EXE bootstrapper is used to manage the prerequisite installation and it is basically a launcher for the main MSI package. The main MSI can be placed next to the EXE bootstrapper or it can be included in the EXE. The same applies to the prerequisite installation files.

In the "Bootstrapper" tab of the "Media" page you can select the "Include install files in EXE" option to obtain a single EXE setup file which contains all the installation files. This is recommended for what you need to do.

A prerequisite installation may need multiple files (like in your case). When a prerequisite is added in the project you can select only its setup file. The rest of the files needed for the prerequisite installation can be added in the Files tab of the "Edit Prerequisite" dialog. For you project you can add the INI file in this tab.

Since all the files are included in the EXE, they will be extracted when the installation runs. The extraction path is set in the "Bootstrapper" tab of the "Media" page. In your project you can use this path:

Code: Select all

[AppDataFolder]SQL Server Express
After your project is configured like explained above, you can set the command line of the prerequisite. For example, if the name of the INI file is "MyConfig.ini" the command line can be set to:

Code: Select all

/CONFIGURATIONFILE="%APPDATA%\SQL Server Express\MyConfig.ini"
The "APPDATA" environment variable will have the same path as the "AppDataFolder" property. This command line should work because the INI was added as a prerequisite file and the prerequisite is extracted in the path specified in the "Bootstrapper" tab.
stevehiner wrote:I've noticed that the prerequisite included only detects the version of the default instance.
This was a bug in previous versions of Advanced Installer. The latest version (6.7.1) uses different detection criteria and the prerequisite should be detected correctly.
stevehiner wrote:Would it be possible in the prereq system you have set up to have it pull the instance name out of the registry then use that value to look up another key in the registry to find out the instance version numbers? What if there are more than one named instance, can it do this in a loop of some sort?
I'm afraid that this is not supported by the EXE bootstrapper. However, the criteria used in the latest version of Advanced Installer should work correctly.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stevehiner
Posts: 9
Joined: Fri Jan 07, 2005 6:42 pm
Contact: Website

Re: add SQL Server Express

cosmin wrote: stevehiner wrote:I've noticed that the prerequisite included only detects the version of the default instance.

This was a bug in previous versions of Advanced Installer. The latest version (6.7.1) uses different detection criteria and the prerequisite should be detected correctly.
I'm running version 6.7.1. I just downloaded it a couple days ago. I'm evaluating it to see if I want to upgrade from version 3.4 that I've been using. SQL detection is the main feature I was interested in. Just looking at it with my inexperienced view, it looks like the SQL Express 2008 prereq might detect it both ways but the SQL Express 2005 only detects the default instance (it only checks one registry key). I guess I didn't make it clear in my other posting that I need to check for 2005 (sorry about that). Our software has to run on Windows 2000 which isn't supported in .Net 3.5 and SQL Express 2008 requires the 3.5 framework so we can't use it (though I'd love to be able to).

Thanks for the help.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: add SQL Server Express

Hi,

We performed some tests and indeed the SQL Server 2005 prerequisite uses an incorrect detection criteria. Thank you for bringing this to our attention. This bug will be fixed in the next version which is scheduled for release next week.

Until then, you can try using this registry value:

Code: Select all

HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup\CurrentVersion\CurrentVersion
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Frode
Posts: 34
Joined: Thu Feb 26, 2009 3:11 pm

Re: add SQL Server Express

cosmin wrote:
A prerequisite installation may need multiple files (like in your case). When a prerequisite is added in the project you can select only its setup file. The rest of the files needed for the prerequisite installation can be added in the Files tab of the "Edit Prerequisite" dialog. For you project you can add the INI file in this tab.
Well, this tab is only available when File in Package. For SQL Server install you normaly use URL (to avoid this huge file for those that already have SQL). What is the solution to this problem in that situation?

-frode
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: add SQL Server Express

Hi,

I'm afraid that multi-file prerequisites need to be used as File in Package. Unfortunately the EXE bootstrapper cannot download multiple files for the same prerequisite.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Frode
Posts: 34
Joined: Thu Feb 26, 2009 3:11 pm

Re: add SQL Server Express

cosmin wrote:Hi,

I'm afraid that multi-file prerequisites need to be used as File in Package. Unfortunately the EXE bootstrapper cannot download multiple files for the same prerequisite.

Regards,
Cosmin
Is there anyway I can fake this, eg. create a parent prereq. (File in Package) that somehow does nothing but includes this config file?

-frode
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: add SQL Server Express

Hi,
Is there anyway I can fake this, eg. create a parent prereq. (File in Package) that somehow does nothing but includes this config file?
You could try to create a package which install the INI and set it as a prerequisite before SQL Server, but I'm not sure if it will work. Unfortunately the EXE bootstrapper does not support what you need.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”