How to install SQL Server Express with your application
The following article uses options that are available starting with the Enterprise edition and project type.
This article will provide information regarding how to silently deploy SQL Server Express along with your setup.
Create the project
The first step is to create a new Enterprise project type:
Add the predefined SQL Server Express prerequisite
The next step is to go to Prerequistes page and add SQL Server Express from the Predefined Prerequisites list:
Make sure you click "Yes" when prompted to download the prerequisite files and include them in your package. In this way the prerequisite can be installed offline.
After the download is complete the prerequisite will be added to your project and will be scheduled to launch before the main package:
Configure the prerequisite to run silently
After the prerequisite is added to your project you have to make sure it will run silently. To accomplish this go to Prerequisite Installation Tab and specify the silent command line in the Command line field, for example:
/x:C: \ExtractionFolder /qs /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /SOLSVCACCOUNT="<ComputerName/DomainName>\<UserName>"/SQLSVCPASSWORD="<password>" /SQLSYSADMINACCOUNTS="<ComputerName/DomainName>\<UserName>" /AGTSVCACCOUNT="NT AUTHORITY\ Network Service" /SQLSVCINSTANTFILEINIT="True" /ACCEPTSQLSERVERLICENSETERMS
Run the package
The final step is to build your package and launch it silently.
After building the package open the cmd.exe and run the package with /exenoui /qb! parameters:
SQL Server Express will be installed with no input required from the user.