I needed to install SQL Server Express 2016 silently, but the documentation out there wasn’t the best. The trick to installing this silently is to create a
ConfigurationFile.ini and then reference that during the install.
Luckily for us, the installer creates the Configuration File for us.
Download SQL Server
I’ve only tested this using the offline installer (roughly 400MB), not the bootstrapped version (4MB). Start by downloading the SQL Server installer. For this guide, I’m using the 2016 Full Offline installer, which can be found here: https://download.microsoft.com/download/9/0/7/907AD35F-9F9C-43A5-9789-52470555DB90/ENU/SQLEXPRx64ENU.exe
Run the installer
After that, you’ll want to run the installer on the package that you downloaded:
SQLEXPR_x64_ENU.exe /ACTION=INSTALL /UIMODE=Normal
Please take note that /Action parameter is required. Setting /UImode to Normal will present every dialog box that exists in the installer (even ones that do not apply to Express). Normal is the default value for non-express editions.
Go through the various installation steps using the GUI until you get to the “Ready to InstalL” step. Once here, if you look at the bottom of the GUI window, it will give you path to the Configuration File that the setup created.
A few more changes
A few things you should know about your
- You must add
IACCEPTSQLSERVERLICENSETERMS="True"to your file manually. The installer does not create this for you, and the install will fail without this.
- Optionally, you can specify the SA account password by referencing
- To install silently, you need to set
QUIET="True". You cannot have both
QUIETSIMPLEboth set to
True. It’s one or the other.
- Also, if you want to install silently, you must remove or comment out
UIMODE="Normal"in the file.
A sample configuration
This is what my configuration looked like. Feel free to copy it if you’d like:
cd to the subdirectory where all your files were extracted. You’ll then run the following command:
That’s it! Enjoy.