Unattended MSSQL 2005 Installation – Command Line Installation of MSSQL

Microsoft SQL Server is a relational model database server produced by Microsoft and it’s Installation is quite Easy using GUI where a user has to selects the options which he/she needs with the database server and install it. We can automate the installation procedure and make it so simple that MSSQL can be installed using a single command.

Automating SQL server installation is made easier in MSSQL 2005 version and we can define the components which need to be installed with setup.exe via command prompt OR we can create an ini file which will contain all the information about the installation. In this post I will explain the steps to install MSSQL 2005 using command prompt with the help of single command.

Install MSSQL using Command Prompt (By Defining all modules in command)

1) Insert the MSSQL installation media into the disk drive.

2) Open Command Prompt (Start >> Run >> cmd >> Enter)

3) Execute following command

Start /wait [CD or DVD Drive]\servers\setup.exe /qb INSTANCENAME=[InstanceName] ADDLOCAL=All PIDKEY=[pidkey value with no “-“] SAPWD=[StrongPassword] SQLACCOUNT=[domain\user] SQLPASSWORD=[DomainUserPassword] AGTACCOUNT=[domain\user] AGTPASSWORD=[DomainUserPassword] SQLBROWSERACCOUNT=[domain\user] SQLBROWSERPASSWORD=[DomainUserPassword]

Here, ADDLOCAL is set to “All” which will install all the components and modules bundled with the MSSQL. If you want customized modules then you can declare the modules instead of “All“.

Install MSSQL using .ini file

1) Open Notepad (Start >> Run >> Notepad >> Enter)

2) Insert all the “Installation Parameters” in that file. Following is the sample file which I have used to install MSSQL on my System


Here, PIDKEY will be the Product Key of the product shipped with MSSQL.

3) Save this file with extension .ini (like sqlsetup.ini)

4) Execute following command to run the setup

[CD or DVD Drive]/servers/setup.exe /settings [path to setup file]\sqlsetup.ini /qb

Points to Note:

1) While specifying the accounts like SQLACCOUNT, AGTACCOUNT and SQLBROWSERACCOUNT make sure you define proper users. Users can be

Domain User account     : [domain\user]
Local System Account    : “NT AUTHORITY\SYSTEM”
Network Service Account : “NT AUTHORITY\NETWORK SERVICE”
Local Service Account   : “NT AUTHORITY\LOCAL SERVICE”

2) Microsoft provides a template.ini file in the installation media but I would strongly recommend to remove the options that you don’t want.

You can refer to Microsoft tutorial for more information and component help at http://msdn.microsoft.com/en-us/library/ms144259.aspx

About: Mike

Milind Koyande loves to work on new technologies specially virtualization and troubleshoot server problems. I’m an avid photographer and love to spend my free time close to nature, trying to capture its glory on my camera.

One thought on “Unattended MSSQL 2005 Installation – Command Line Installation of MSSQL”

This site uses Akismet to reduce spam. Learn how your comment data is processed.