
Command line
Installing SQL Server directly from the command line is possible but when searching the Install SQL Server from the Command Prompt topic on MSDN, the user will obtain a huge set of options that need to be added to the command prompt (or to the bat file) directly. It leads to a big risk of misspellings and other mistakes.
A better approach is to use configuration files for command prompt installations. It contains the same options as the command prompt itself, but we can find very good working examples from any setup already run from the wizard. When the wizard setup finishes, it leaves the setup log and configuration on disk. If SQL Server is installed in the default location, the path is C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log. In this location is a file called Summary.txt, which contains the actual path to the ConfigurationFile.inifile. The configuration file can be copied and adjusted as needed and then run using the following command from the command prompt:
setup.exe /ConfigurationFile=<path to my config file>.ini
The SQL Server installation wizard allows you to prepare a configuration file without installing. When the administrator goes through the wizard, everything is saved in the newly created configuration file. In the summary step of the wizard, the path to the configuration file is shown. So the administrator can cancel the wizard without the actual installation of SQL Server.