Installing SQL Server 2012 in unattended mode using command line and configuration file

1-Create cmd file  with below highlighted text and save it as c:\SQLCMDInstaller\InstallSQL.CMD

<SQL media>l\setup.exe /Configurationfile="ConfigurationFile.ini" /IAcceptSQLServerLicenseTerms

replace the <SQL media> with the path where you have your SQL media.

2-Create ConfigurationFile.ini file below with the highlighted text below, and saved it in  c:\SQLCMDInstaller\

Configure the parameters highlighted in green

those are 

  1. Features to be installed.
  2. AS SYS Admin account.
  3. SQL SYS Admin account.
  4. Instance name.

;SQL SERVER 2012 Configuration File

; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.


; Detailed help for command line argument ROLE has not been defined yet.


; Detailed help for command line argument ENU has not been defined yet.


; Setup will not display any user interface.


; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and
False or 1 and 0. By default SQL Server Setup will include updates that are found.


; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS,
MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality
Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server
Data Tools, and other shared components.


; Specifies the list of administrator accounts that need to be provisioned.


; Windows account(s) to provision as SQL Server system administrators.


; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to
enable and 0 or False to disable this feature.


; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to
enable and 0 or False to disable this feature.


; 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).


; RSInputSettings_RSInstallMode_Description


; Don't provision current user as a Database Engine system administrator.


3-Run cmd prompt as Administrator, change the prompt to  c:\SQLCMDInstaller\

run  InstallSQL.CMD


this will install SQL as evaluation sku, to specify required sku, PID setting needs to be specified in the configuration file.

Comments (18)

  1. Papy Normand says:

    I am sorry ,but i think that i missed something in your excellent and useful post

    You wrote "2-Create "     : the extension is .in or .ini ?

    I am sorry but i am beginning to try unattended installations of SQL Server ( i am really a beginner for this topic ).So, if i am going wrong, i hope you will accept to forgive me.

    Another little remark : is it possible to lower the size of the font as some lines are cut for ewample, the line beginning by FEATURES=

    I am appreciating your articles, and i am not trying to criticize you , only to understand quicklier what you wrote  

  2. Thanks a lot for the feedback, I have reformatted the parts you mentioned

  3. Papy Normand says:

    Thanks for your quick modifications to reformat your post.

    Now, it deserve a 5-star rate

  4. Sean says:


    The installation doesn't work, it tells me that "The syntax of argument "/FALSE" is incorrect. Either the delimiter '=' is missing or there is one or more space characters before the delimiter '='".

    Could you help me please?

    Thanks a lot.

  5. Make sure you don't have the config file word wrapped

  6. Sean says:

    Problem solved, it was just the commented line that wasn't commented 🙂

  7. Sean says:

    The installation worked. Could you please tell me what parameter I need to include SQL Server Management Studio in the installation?

    Thank you very much.

  8. Sean says:

    Ok, the parameter name is SSMS in features, but the problem is that it wasn't installed, even if the cmd file returned no errore.

  9. Sean says:

    Now it works, problem of my server, you can delete these messages 😉

  10. vijay says:

    I tried to install sql 2008-r2

    but i am getting error like "the system can not find path"  

    i given in media paath without any quotes E:....

  11. Ngwanevic says:

    Hi Ahmend,

    I have a same problem as Sean but i'm not sure what line he is talking about.

    Thanks for the post

  12. Mathew says:

    I am trying to install SQL 2012 managment tools Complete(NON express)? any idea where do I get it?? please help

  13. Dave Bisset says:

    Brilliant page, helped with some troubleshooting. Do you have the uninstall line that could be used for a fairly generic uninstall?

  14. Avi says:

    Hi I got the isntall to work but it did not seem to instal the Management Studio , i see peter had the same issue , any idea why?

  15. SlightlyShady says:

    You could also use the method described here under, "How to generate a configuration file", to create the config file.

    Just be sure to comment out the UIMODE = "Normal" if you are going to use QUIET = true.

  16. dmc says:

    If I wanted to automate my sql instance installs, can I run the script multiple times against the same server, just changing the instance name?

    If the answer is yes, when a second install is running, will the first instance installed become unavailable until the second install is complete?

  17. Jeff says:

    What is the "thing" right before the "backslash," after "<SQL media>" ? Is that an "I" an "L" - what does it mean, what's its purpose or is it a typo?



    "<SQL media>lsetup.exe /Configurationfile="ConfigurationFile.ini" /IAcceptSQLServerLicenseTerms"

Skip to main content