SQL Server 2014 Express Silent install without Choose directory prompt

18,820

Solution 1

There was a change in the self-extract Express packages in SQL Server 2014. The default location where payload is extracted was changed. That location can be specified on the UI or on the command line.

To preset the location on the UI run:
SQLEXPR_x64_ENU.exe /x:LocationToExtract

To extract payload to a specific location without prompt use and with the progress bar use: SQLEXPR_x64_ENU.exe /u /x:LocationToExtract

To extract payload to a specific location without prompt and silent use: SQLEXPR_x64_ENU.exe /q /x:LocationToExtract

There is an issue that /qs parameter is not recognized and cannot be used the same way as in SQL 2012. That issue will be addressed in SQL Server 2014 Service Pack 1.

Answered from a official representative from microsoft. Here

Solution 2

The SQL Server Express edition (e.g. 2014) allows itself to be installed silently. Other earlier versions of SQL Expression edition do so to.

Once you download the Microsoft installer, e.g: SQLEXPR_x64_ENU.exe

And you extract it, as explained in accepted answer, you can go further and install the product silently. The following is an example of how to install SQL Server Expression 2014 on a dump dummy test location.

setup.exe /q   /Action=Install /IAcceptSQLServerLicenseTerms=True /Features=SQL /InstanceName=SQLExpressTest01  /SQLSYSADMINACCOUNTS="Builtin\Administrators" /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /INSTANCEDIR="c:\dev\dump\SQLExpressInstanceDir" /INSTALLSHAREDDIR="c:\dev\dump\SQLExpressInstanceDir"

An overview of command options to setup.exe is given by the Microsoft official documentation: https://social.technet.microsoft.com/wiki/contents/articles/940.how-to-embed-sql-server-express-in-an-application.aspx#advInstall

In the preceding examples:

/q – specifies that Setup run in a quiet mode without any user interface.
/Action – specifies which action to perform. In this example, the action is Install.
/Hideconsole – specifies that the console window is hidden or closed during the install.
/IAcceptSQLServerLicenseTerms - indicates acceptance of the Microsoft SQL Server license terms.
/Features – specifies which parent features and features to install. In this example, the parent feature SQL is installed, which includes SQLEngine, Replication, and Fulltext components. The Tools feature installs all of the tools components.
/InstanceName – specifies a SQL Server instance name.
/SQLSYSADMINACCOUNTS –provisions logins to be members of the system administrators role.
/SQLSVCACCOUNT – specifies the startup account for the SQL Server service.
/SQLSVCPASSWORD – specifies the password for SQLSVCACCOUNT.

What you cannot do with Microsfot SQL Server, bundle it stand-alone, as you would do with HSQL or PostgresSQL. Microsoft SQL Server needs to be installed running its full fledged installer on the target machine where your intend to run your application. Not the most portable database in this regard.

Solution 3

This option can be put in ConfigurationFile.ini also:

x="C:\share\sql_temp"

But putting 'q' option there for silent install didn't work. So I put path into ini file and q option in command string, for example:

setup.exe /SAPWD="pass" /ConfigurationFile="A:\ConfigurationFile.ini" /q
Share:
18,820
fwan
Author by

fwan

Updated on June 29, 2022

Comments

  • fwan
    fwan almost 2 years

    I would like to do a silent install with /qs command to install sql server 2014 express. I did many installations with 2008 express and it did not have this kind of issue.

    When I try to install, by double clicking the setup file or by command line install, it shows Choose directory for extracted files prompt. I have searched alot but I cannot find any information about this.

    My question is: Is there a way to specify the path to be extracted along with other commands?

    I thought /qs (silent mode) should not accept any user input which looks like it's a flaw in 2014 version. Any ideas?