Microsoft SQL Server 2016 Express is a powerful and reliable free data management system that delivers a rich and reliable data store for lightweight Web Sites and desktop applications. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of Microsoft SQL Server 2016 Express from the command line using the EXE installer.
How to Install Microsoft SQL Server 2016 Express Silently
Microsoft SQL Server 2016 Express (SQLEXPR) Silent Install (EXE)
- Navigate to: https://www.microsoft.com/en-us/download/details.aspx?id=56840
- Download & Copy the SQLServer2016-SSEI-Expr.exe to a folder created at (C:\Downloads)
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads folder
- Enter the following command to extract the SQLEXPR_x64_ENU.exe:
SQLServer2016-SSEI-Expr.exe /ACTION=Download MEDIAPATH=C:\Downloads /MEDIATYPE=Core /QUIET
- Press Enter
- Enter the following command to extract the setup installation files:
SQLEXPR_x64_ENU.exe /q /x:C:\Downloads\SQLEXPR_2016
- Press Enter
- Navigate to the C:\Downloads\SQLEXPR_2016 folder
- Enter the following command to generate a configuration file:
SETUP.EXE /UIMODE=Normal /ACTION=INSTALL
- Press Enter
- Follow the installation wizard through to the Ready to Install page.
- The path to the configuration file is specified in the Ready to Install page in the “configuration file path” section.
- Copy the ConfigurationFile.ini referenced in the configuration file path to C:\Downloads\SQLEXPR_2016
- Cancel the setup wizard without actually completing the installation
- Open the ConfigurationFile.ini and modify/add the following options:
- Change QUIET=”False” to QUIET=”True”
- Change UIMODE=”Normal” to ;UIMODE=”Normal”
- Change UpdateEnabled=”True” to UpdateEnabled=”False”
- Add the following line:
- IACCEPTSQLSERVERLICENSETERMS=”True”
- Save the changes to the ConfigurationFile.ini file
Example SQL Server 2016 Configuration File
;SQL Server 2016 Configuration File
[OPTIONS]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Detailed help for command line argument ROLE has not been defined yet.
ROLE="AllFeatures_WithDefaults"
; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line.
SUPPRESSPRIVACYSTATEMENTNOTICE="True"
; By specifying this parameter and accepting Microsoft R Open and Microsoft R Server terms, you acknowledge that you have read and understood the terms of use.
IACCEPTROPENLICENSETERMS="True"
; Use the /ENU parameter to install the English version of SQL Server on your localized Windows operating system.
ENU="True"
; Setup will not display any user interface.
QUIET="True"
; Setup will display progress only, without any user interaction.
QUIETSIMPLE="False"
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
; UIMODE="Normal"
; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.
UpdateEnabled="False"
; If this parameter is provided, then this computer will use Microsoft Update to check for updates.
USEMICROSOFTUPDATE="False"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install shared components.
FEATURES=SQLENGINE,REPLICATION,SNAC_SDK
; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services.
UpdateSource="MU"
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
X86="False"
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS).
INSTANCENAME="SQLEXPRESS"
; Specify the root installation directory for shared components. This directory remains unchanged after shared components are already installed.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components. This directory remains unchanged after WOW64 shared components are already installed.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.
INSTANCEID="SQLEXPRESS"
; Specifies which mode report server is installed in.
; Default value: “FilesOnly”
RSINSTALLMODE="DefaultNativeMode"
; TelemetryStartupConfigDescription
SQLTELSVCSTARTUPTYPE="Disabled"
; TelemetryUserNameConfigDescription
SQLTELSVCACCT="NT AUTHORITY\NETWORK SERVICE"
; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; Agent account name
AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Disabled"
; CM brick TCP communication port
COMMFABRICPORT="0"
; How matrix will use private networks
COMMFABRICNETWORKLEVEL="0"
; How inter brick communication will be protected
COMMFABRICENCRYPTION="0"
; TCP port used by the CM brick
MATRIXCMBRICKCOMMPORT="0"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Set to "1" to enable RANU for SQL Server Express.
ENABLERANU="True"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Set to "True" to enable instant file initialization for SQL Server service. If enabled, Setup will grant Perform Volume Maintenance Task privilege to the Database Engine Service SID. This may lead to information disclosure as it could allow deleted content to be accessed by an unauthorized principal.
SQLSVCINSTANTFILEINIT="False"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
; The number of Database Engine TempDB files.
SQLTEMPDBFILECOUNT="1"
; Specifies the initial size of a Database Engine TempDB data file in MB.
SQLTEMPDBFILESIZE="8"
; Specifies the automatic growth increment of each Database Engine TempDB data file in MB.
SQLTEMPDBFILEGROWTH="64"
; Specifies the initial size of the Database Engine TempDB log file in MB.
SQLTEMPDBLOGFILESIZE="8"
; Specifies the automatic growth increment of the Database Engine TempDB log file in MB.
SQLTEMPDBLOGFILEGROWTH="64"
; Provision current user as a Database Engine system administrator for %SQL_PRODUCT_SHORT_NAME% Express.
ADDCURRENTUSERASSQLADMIN="True"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="1"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="1"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Automatic"
; Specifies which account the report server NT service should execute under. When omitted or when the value is empty string, the default built-in account for the current operating system.
; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
; The domain part of RSSVCACCOUNT is a maximum of 254 characters long.
RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Specifies how the startup mode of the report server NT service. When
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled
RSSVCSTARTUPTYPE="Automatic"
; Add description of input argument EXTSVCACCOUNT
EXTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Accept the SQL Server License Terms
IACCEPTSQLSERVERLICENSETERMS="True"
To specify passwords at the command prompt instead of in the configuration file you can use the following format:
SETUP.EXE /SQLSVCPASSWORD="************" /AGTSVCPASSWORD="************" /ASSVCPASSWORD="************" /ISSVCPASSWORD="************" /RSSVCPASSWORD="************" /ConfigurationFile=ConfigurationFile.ini |
- Enter the following command to install SQL Server Express:
SETUP.EXE /ConfigurationFile=ConfigurationFile.ini
- Press Enter
After a few minutes you should see the Microsoft SQL Server 2016 Express entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.
Software Title: | SQL Server 2016 Express |
Vendor: | Microsoft Corporation |
Architecture: | x64 |
Installer Type: | EXE |
Silent Install Switch: | SETUP.EXE /ConfigurationFile=ConfigurationFile.ini |
Silent Uninstall Switch: | SETUP.EXE /ConfigurationFile=ConfigurationFile_Uninstall.ini |
Download Link: | https://www.microsoft.com/en-us/download/details.aspx?id=56840 |
PowerShell Script: | https://silentinstallhq.com/microsoft-sql-server-2016-express-install-and-uninstall-powershell/ |
Microsoft SQL Server 2016 Express with Advanced Services (SQLEXPRADV) Silent Install (EXE)
- Navigate to: https://www.microsoft.com/en-us/download/details.aspx?id=56840
- Download & Copy the SQLServer2016-SSEI-Expr.exe to a folder created at (C:\Downloads)
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads folder
- Enter the following command to extract the SQLEXPRADV_x64_ENU.exe:
SQLServer2016-SSEI-Expr.exe /ACTION=Download MEDIAPATH=C:\Downloads /MEDIATYPE=Advanced /QUIET
- Press Enter
- Enter the following command to extract the setup installation files:
SQLEXPRADV_x64_ENU.exe /q /x:C:\Downloads\SQLEXPRADV_2016
- Press Enter
- Navigate to the C:\Downloads\SQLEXPRADV_2016 folder
- Enter the following command to generate a configuration file:
SETUP.EXE /UIMODE=Normal /ACTION=INSTALL
- Press Enter
- Follow the installation wizard through to the Ready to Install page.
- The path to the configuration file is specified in the Ready to Install page in the “configuration file path” section.
- Copy the ConfigurationFile.ini referenced in the configuration file path to C:\Downloads\SQLEXPRADV_2016
- Cancel the setup wizard without actually completing the installation
- Open the ConfigurationFile.ini and modify/add the following options:
- Change QUIET=”False” to QUIET=”True”
- Change UIMODE=”Normal” to ;UIMODE=”Normal”
- Change UpdateEnabled=”True” to UpdateEnabled=”False”
- Add the following line:
- IACCEPTSQLSERVERLICENSETERMS=”True”
- Save the changes to the ConfigurationFile.ini file
Example SQL Server 2016 Configuration File
;SQL Server 2016 Configuration File
[OPTIONS]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Detailed help for command line argument ROLE has not been defined yet.
ROLE="AllFeatures_WithDefaults"
; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line.
SUPPRESSPRIVACYSTATEMENTNOTICE="True"
; By specifying this parameter and accepting Microsoft R Open and Microsoft R Server terms, you acknowledge that you have read and understood the terms of use.
IACCEPTROPENLICENSETERMS="True"
; Use the /ENU parameter to install the English version of SQL Server on your localized Windows operating system.
ENU="True"
; Setup will not display any user interface.
QUIET="True"
; Setup will display progress only, without any user interaction.
QUIETSIMPLE="False"
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
; UIMODE="Normal"
; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.
UpdateEnabled="False"
; If this parameter is provided, then this computer will use Microsoft Update to check for updates.
USEMICROSOFTUPDATE="False"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install shared components.
FEATURES=SQLENGINE,REPLICATION,ADVANCEDANALYTICS,FULLTEXT,RS,CONN,BC,SDK,BOL,SNAC_SDK
; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services.
UpdateSource="MU"
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
X86="False"
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS).
INSTANCENAME="SQLEXPRESS"
; Specify the root installation directory for shared components. This directory remains unchanged after shared components are already installed.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components. This directory remains unchanged after WOW64 shared components are already installed.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.
INSTANCEID="SQLEXPRESS"
; Specifies which mode report server is installed in.
; Default value: “FilesOnly”
RSINSTALLMODE="DefaultNativeMode"
; TelemetryStartupConfigDescription
SQLTELSVCSTARTUPTYPE="Disabled"
; TelemetryUserNameConfigDescription
SQLTELSVCACCT="NT AUTHORITY\NETWORK SERVICE"
; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; Agent account name
AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Disabled"
; CM brick TCP communication port
COMMFABRICPORT="0"
; How matrix will use private networks
COMMFABRICNETWORKLEVEL="0"
; How inter brick communication will be protected
COMMFABRICENCRYPTION="0"
; TCP port used by the CM brick
MATRIXCMBRICKCOMMPORT="0"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Set to "1" to enable RANU for SQL Server Express.
ENABLERANU="True"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Set to "True" to enable instant file initialization for SQL Server service. If enabled, Setup will grant Perform Volume Maintenance Task privilege to the Database Engine Service SID. This may lead to information disclosure as it could allow deleted content to be accessed by an unauthorized principal.
SQLSVCINSTANTFILEINIT="False"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
; The number of Database Engine TempDB files.
SQLTEMPDBFILECOUNT="1"
; Specifies the initial size of a Database Engine TempDB data file in MB.
SQLTEMPDBFILESIZE="8"
; Specifies the automatic growth increment of each Database Engine TempDB data file in MB.
SQLTEMPDBFILEGROWTH="64"
; Specifies the initial size of the Database Engine TempDB log file in MB.
SQLTEMPDBLOGFILESIZE="8"
; Specifies the automatic growth increment of the Database Engine TempDB log file in MB.
SQLTEMPDBLOGFILEGROWTH="64"
; Provision current user as a Database Engine system administrator for %SQL_PRODUCT_SHORT_NAME% Express.
ADDCURRENTUSERASSQLADMIN="True"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="1"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="1"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Automatic"
; Specifies which account the report server NT service should execute under. When omitted or when the value is empty string, the default built-in account for the current operating system.
; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
; The domain part of RSSVCACCOUNT is a maximum of 254 characters long.
RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Specifies how the startup mode of the report server NT service. When
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled
RSSVCSTARTUPTYPE="Automatic"
; Add description of input argument EXTSVCACCOUNT
EXTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Accept the SQL Server License Terms
IACCEPTSQLSERVERLICENSETERMS="True"
To specify passwords at the command prompt instead of in the configuration file you can use the following format:
SETUP.EXE /SQLSVCPASSWORD="************" /AGTSVCPASSWORD="************" /ASSVCPASSWORD="************" /ISSVCPASSWORD="************" /RSSVCPASSWORD="************" /ConfigurationFile=ConfigurationFile.ini |
- Enter the following command to install SQL Server Express:
SETUP.EXE /ConfigurationFile=ConfigurationFile.ini
- Press Enter
After a few minutes you should see the Microsoft SQL Server 2016 Express entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.
Software Title: | SQL Server 2016 Express with Advanced Services |
Vendor: | Microsoft Corporation |
Architecture: | x64 |
Installer Type: | EXE |
Silent Install Switch: | SETUP.EXE /ConfigurationFile=ConfigurationFile.ini |
Silent Uninstall Switch: | SETUP.EXE /ConfigurationFile=ConfigurationFile_Uninstall.ini |
Download Link: | https://www.microsoft.com/en-us/download/details.aspx?id=56840 |
The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website.
How to Uninstall SQL Server 2016 Express Silently
Check out the Microsoft SQL Server 2016 Express Install and Uninstall (PowerShell) post for a scripted solution.
SQL Server 2016 Express Silent Uninstall (EXE)
- Open Notepad or your favorite text editor
- Add the following lines:
;SQL Server 2016 Configuration File
[OPTIONS]
ACTION="Uninstall"
QUIET="True"
FEATURES=SQLENGINE,REPLICATION,SNAC_SDK
INSTANCENAME="SQLEXPRESS"
IACCEPTSQLSERVERLICENSETERMS="True"
Note: Features & InstanceName must match what is currently installed for this to work.
- Save the file and name it: ConfigurationFile_Uninstall.ini
- Copy the ConfigurationFile_Uninstall.ini file to “C:\Downloads\SQLEXPR_2016\“
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads\SQLEXPR_2016 folder
- Enter the following command to uninstall SQL Server Express:
SETUP.EXE /ConfigurationFile=ConfigurationFile_Uninstall.ini
- Press Enter
SQL Server 2016 Express with Advanced Services Silent Uninstall (EXE)
- Open Notepad or your favorite text editor
- Add the following lines:
;SQL Server 2016 Configuration File
[OPTIONS]
ACTION="Uninstall"
QUIET="True"
FEATURES=SQLENGINE,REPLICATION,ADVANCEDANALYTICS,FULLTEXT,RS,CONN,BC,SDK,BOL,SNAC_SDK
INSTANCENAME="SQLEXPRESS"
IACCEPTSQLSERVERLICENSETERMS="True"
Note: Features & InstanceName must match what is currently installed for this to work.
- Save the file and name it: ConfigurationFile_Uninstall.ini
- Copy the ConfigurationFile_Uninstall.ini file to “C:\Downloads\SQLEXPRADV_2016\“
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads\SQLEXPRADV_2016 folder
- Enter the following command to uninstall SQL Server Express:
SETUP.EXE /ConfigurationFile=ConfigurationFile_Uninstall.ini
- Press Enter
Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.