Unattended MSSQL 2005 Installation – Command Line Installation of MSSQL

By: Published: Nov 5th, 2012 Category: Microsoft Windows, MSSQL, Plesk For Windows, Windows Virtuozzo

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


Milind Koyande is a Project Manager and his job is to work with new technologies, specially Cloud Computing / Virtualization Technology. His past projects include Government Sector initiatives, Backup and Disaster Recovery Solutions.

Tags: , , , , , , ,

One Response to “Unattended MSSQL 2005 Installation – Command Line Installation of MSSQL”

  1. Unattended MSSQL 2005 Installation – Command Line Installation of MSSQL « .:][ Gr8 Admin Team ][:.
    on Feb 23rd, 2010
    @ 11:39 am

    […] complete Article here Categories: Windows Tags: ADDLOCAL, AGTACCOUNT user, Command Line Installation of MSSQL, […]

Leave a Reply

Subscribe to eITWebguru

© 2012 eITWebguru. All Rights Reserved.