Recently I posted an article about how to perform an unattended installation of SQL Server 2005 Express. A comment was posted asking how to set some specific options during the installation - here’s how.

The question posted was the following:

Maybe you can help, cause i’ve pretty much give up :-/
These are the settings i need:
Uncheck for “Hide the advanced configuration options”
Enable all features except “Replication”
i need it as “Default Instance”
Using “Local System and “Use the build-in system account”
I need both SQL Server and Browse
and i need Mixed Mode

Is it possible to do that in the script file ?

The answer is as follows (with the exception of the hide advanced configuration options - it’s not necessary to worry about that during an unattended install).

Yes, all the options you’ve asked about can be set in the script file. Here you go …

There is a section that begins with ADDLOCAL. Replication isn’t a valid option for SQL Express so I assume you’re trying to install SQL Express w/ Advanced Services? If so, set the ADDLOCAL= section to something like the following:

ADDLOCAL=SQL_Engine,SQL_Data_Files,Client_Components,Connectivity,SQL_SSMSEE,SDK

That will install the SQL Engine, data files, client components, client connectivity, management studio express and the SQL SDK. Note that SQL_SSMSEE is only valid for SQL Express w/ Advanced Services. Simply add ‘Replication’ to the list above if you *do* want to install replication (remember to comma-separate the options …)

For the default instance just set the INSTANCENAME= to the following:

INSTANCENAME=MSSQLSERVER

For the browser service, set the SQLBROWSERAUTOSTART= section to the following:

SQLBROWSERAUTOSTART=1

If you want SQL and the SQL Agent to auto start too, set the above section to the following:

SQLBROWSERAUTOSTART=1
SQLAUTOSTART=1
AGTAUTOSTART=1

For mixed mode, set the SECURITYMODE= section to the following:

SECURITYMODE=SQL

Note that if you configure your installation for mixed mode you also need to specify a strong SA password, for example:

SECURITYMODE=SQL
SAPWD=sQ15Erv3R

To specify that the SQL Server service should use Local System as the credential, set the SQLACCOUNT= section to the following:

SQLACCOUNT=”NT AUTHORITY\LOCAL SERVICE”

Hope that helps someone.

Tags: , , , , ,