Microsoft SQL Server 2019 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 2019 Express from the command line using the EXE installer.
How to Install Microsoft SQL Server 2019 Express Silently
Microsoft SQL Server 2019 Express (SQLEXPR) Silent Install (EXE)
- Navigate to: https://www.microsoft.com/en-us/download/details.aspx?id=101064
- Download & Copy the SQL2019-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:
SQL2019-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_2019
- Press Enter
- Navigate to the C:\Downloads\SQLEXPR_2019 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_2019
- 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 2019 Configuration File
;SQL Server 2019 Configuration File
[OPTIONS]
; By specifying this parameter and accepting Microsoft Python Open and Microsoft Python Server terms, you acknowledge that you have read and understood the terms of use.
IACCEPTPYTHONLICENSETERMS="True"
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Setup roles install SQL Server in a predetermined configuration.
ROLE="AllFeatures_WithDefaults"
; 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"
; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line.
SUPPRESSPRIVACYSTATEMENTNOTICE="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 that SQL Server Setup should not display the paid edition notice when ran from the command line.
SUPPRESSPAIDEDITIONNOTICE="True"
; 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"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, 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
; 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), or Analysis Services (AS).
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"
; Account for SQL Server CEIP service: Domain\User or system account.
SQLTELSVCACCT="NT AUTHORITY\NETWORK SERVICE"
; Startup type for the SQL Server CEIP service.
SQLTELSVCSTARTUPTYPE="Disabled"
; 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"
; The max degree of parallelism (MAXDOP) server configuration option.
SQLMAXDOP="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 Server 2019 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"
; User account for Launchpad Service.
EXTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; User account for Full-text Filter Daemon Host.
FTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Use SQLMAXMEMORY to minimize the risk of the OS experiencing detrimental memory pressure.
SQLMAXMEMORY="2147483647"
; Use SQLMINMEMORY to reserve a minimum amount of memory available to the SQL Server Memory Manager.
SQLMINMEMORY="0"
; 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 2019 Express entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.
Software Title: | SQL Server 2019 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=101064 |
Video Tutorial: | Microsoft SQL Server 2019 Express Silent Install (How-To Guide) Video |
PowerShell Script: | https://silentinstallhq.com/microsoft-sql-server-2019-express-install-and-uninstall-powershell/ |
Detection Script: | https://silentinstallhq.com/create-a-custom-detection-script-for-microsoft-sql-server-2019-express-powershell/ |
Microsoft SQL Server 2019 Express with Advanced Services (SQLEXPRADV) Silent Install (EXE)
- Navigate to: https://www.microsoft.com/en-us/download/details.aspx?id=101064
- Download & Copy the SQL2019-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:
SQL2019-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_2019
- Press Enter
- Navigate to the C:\Downloads\SQLEXPRADV_2019 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_2019
- 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 2019 Configuration File
;SQL Server 2019 Configuration File
[OPTIONS]
; By specifying this parameter and accepting Microsoft Python Open and Microsoft Python Server terms, you acknowledge that you have read and understood the terms of use.
IACCEPTPYTHONLICENSETERMS="True"
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Setup roles install SQL Server in a predetermined configuration.
ROLE="AllFeatures_WithDefaults"
; 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"
; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line.
SUPPRESSPRIVACYSTATEMENTNOTICE="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 that SQL Server Setup should not display the paid edition notice when ran from the command line.
SUPPRESSPAIDEDITIONNOTICE="True"
; 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"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, 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,SQL_INST_MR,SQL_INST_MPY,SQL_INST_JAVA,FULLTEXT,CONN,BC,SDK,SNAC_SDK
; 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), or Analysis Services (AS).
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"
; Account for SQL Server CEIP service: Domain\User or system account.
SQLTELSVCACCT="NT AUTHORITY\NETWORK SERVICE"
; Startup type for the SQL Server CEIP service.
SQLTELSVCSTARTUPTYPE="Disabled"
; 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"
; The max degree of parallelism (MAXDOP) server configuration option.
SQLMAXDOP="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 Server 2019 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"
; User account for Launchpad Service.
EXTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; User account for Full-text Filter Daemon Host.
FTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Use SQLMAXMEMORY to minimize the risk of the OS experiencing detrimental memory pressure.
SQLMAXMEMORY="2147483647"
; Use SQLMINMEMORY to reserve a minimum amount of memory available to the SQL Server Memory Manager.
SQLMINMEMORY="0"
; 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 2019 Express entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.
Software Title: | SQL Server 2019 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=101064 |
Video Tutorial: | Microsoft SQL Server 2019 Express Silent Install (How-To Guide) Video |
PowerShell Script: | https://silentinstallhq.com/microsoft-sql-server-2019-express-install-and-uninstall-powershell/ |
Detection Script: | https://silentinstallhq.com/create-a-custom-detection-script-for-microsoft-sql-server-2019-express-powershell/ |
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 2019 Express Silently
Check out the following posts for a scripted solution:
Microsoft SQL Server 2019 Express Install and Uninstall (PowerShell) |
Microsoft SQL Server 2019 Express Silent Uninstall (PowerShell) |
SQL Server 2019 Express Silent Uninstall (EXE)
- Open Notepad or your favorite text editor
- Add the following lines:
;SQL Server 2019 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_2019\“
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads\SQLEXPR_2019 folder
- Enter the following command to uninstall SQL Server Express:
SETUP.EXE /ConfigurationFile=ConfigurationFile_Uninstall.ini
- Press Enter
SQL Server 2019 Express with Advanced Services Silent Uninstall (EXE)
- Open Notepad or your favorite text editor
- Add the following lines:
;SQL Server 2019 Configuration File
[OPTIONS]
ACTION="Uninstall"
QUIET="True"
FEATURES=SQLENGINE,REPLICATION,ADVANCEDANALYTICS,SQL_INST_MR,SQL_INST_MPY,SQL_INST_JAVA,FULLTEXT,CONN,BC,SDK,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_2019\“
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads\SQLEXPRADV_2019 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.