views:

1455

answers:

2

I'm using Installshield 2008 express to create an installation package. My application relies on Sql Server 2005 express edition. I know I am able to check the "microsoft sql server 2005 express" prerequisite under the redistributables tab. However, this leaves the installation entirely in the hands of the end user, and if he/she chooses the defaults all the way through, we end up with a installation with the named instance SqlExpress. At the very least, I'd like to have the installation proceed with a MyCompany named instance as the default.

How do I accomplish this?

Do I have to upgrade to a more powerful version of installshield?

A: 

I have not used InstallShield Express. InstallShield Professional allows you to define the command line that is passed to the SQL Server installation. This allows you to define an instance name along with other parameters such as 'quiet' mode.

jmatthias
+1  A: 

If the express addition supports install script you can use the following bit of code. You need to include the Sql Express redist in your install somewhere

LaunchAppAndWait(SRCDIR+"\SQLEXPR32.EXE", "INSTANCENAME="+ instName + " SECURITYMODE=SQL " + "DISABLENETWORKPROTOCOLS=0 SQLAUTOSTART=1 ADDLOCAL=SQL_Data_Files SAPWD=" + sapass /qb" , LAAW_OPTION_WAIT);

In the above code instName is the name of the instance. If you are using Windows Authentication only you can ommit the secuirty and password options.

Check the MSDN docs for other command line options

I sure this could be ported to VB or could even use one of the built in MSI action types

Jamie