SQL 2008 R2 SP1 – Unattended/command line install

This was a pain to get right, thanks Microsoft for the comprehensive documentation you provide on this kind of thing(!)

The contents of the .exe for SP1 can be extracted using WinZip/7Zip. They contain a setup.exe, this takes the following command line flags:

Microsoft (R) SQL Server 2008 R2 Setup 10.50.2500.00

Copyright (c) Microsoft Corporation. All rights reserved.

Usage:
setup.exe /[option]={value} /[option]={value} ...

Options:
ACTION Specifies a Setup work flow, like INSTALL,
UNINSTALL, or UPGRADE. This is a required
parameter.
ALLINSTANCES Specifies that all instances are to be included
in the Setup operation. This parameter is only
supported when applying a patch.
CLUSTERPASSIVE Specifies that SQL Server Setup should not manage
the SQL Server services. This option should only
be used in a non-Microsoft cluster environment.
ENU Detailed help for command line argument ENU has
not been defined yet.
FARMACCOUNT User account for running the SharePoint Central
Administration service and connecting to the
SharePoint configuration database.
FARMADMINPORT A port number used to connect to the SharePoint
Central Administration web application.
FARMPASSWORD The password for the farm account.
HELP Displays the command line parameters usage
IACCEPTSQLSERVERLICENSETERMS By specifying this parameter and accepting the
SQL Server license terms, you acknowledge that
you have read and understood the terms of use.
INDICATEPROGRESS Specifies that the detailed Setup log should be
piped to the console.
INSTANCEID Specify the Instance ID for the SQL Server
features you have specified. SQL Server directory
structure, registry structure, and service names
will reflect the instance ID of the SQL Server
instance.
INSTANCENAME 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).
PASSPHRASE A pass phrase farm administrators will use to add
application servers or Web front end servers to
an existing farm. The pass phrase must be at
least 8 characters and contain a combination of
uppercase, lowercase, numeric, and non-alphabetic
characters (such as !, $, #, %).
QUIET Setup will not display any user interface.
QUIETSIMPLE Setup will display progress only without any user
interaction.
UIMODE Valid values for the UIMode settings are Normal,
AutoAdvance.
X86 Specifies that Setup should install into WOW64.
This command line argument is not supported on an
IA64 or a 32-bit system.

Press any key to exit...

In addition to the special secret hidden parameter:

IAcceptSQLServerLicenseTerms

Which must be set otherwise it will bomb out of the installation.

I went for the following command line:

\setup.exe /quietsimple /allinstances /indicateprogress /IAcceptSQLServerLicenseTerms

The /indicateprogress flag dumps the log data to stdout, which is useful since it pipes it back through our build system for analysis. The /quietsimple flag gives you in various places a progress bar.