SQL Server – Resolve “The /IAcceptSQLServerLicenseTerms command line parameter is missing or has not been set to true.”

As I blogged before, I am in the process of downgrading most of our Enterprise Edition SQL Servers to Standard Edition. The Uninstalls and Installs are done from the command-line.

When I tried to install SQL Server 2012 Standard from the command-line, I used the following command-line

	/INSTALLSHAREDDIR="d:\Program Files\Microsoft SQL Server"
	/INSTALLSHAREDWOWDIR="d:\Program Files (x86)\Microsoft SQL Server"

I have added new-lines above so that you can see the whole command but in reality, the whole command would be on one line.

As you can see, there is nothing wrong with the command. However, when I try to run the command, I get the in-famous error:

The /IAcceptSQLServerLicenseTerms command line parameter is missing or has not been set to true. It is a required parameter for the setup action you are running. By specifying this parameter and accepting the SQL Server license terms you acknowledge that you have read and understand the terms of use.

Error result: -2054422506
Result facility code: 1420
Result error code: 2

Please review the summary.txt log for further details

Immediately, I looked for these things
1) Is the string malformed in some fashion (missing quotes, spaces etc)
2) Is the switch /IACCEPTSQLSERVERLICENSETERMS misspelled?

Both of these things are right. So, I figured that it might be the upper-case that is throwing it off and switch to the proper-case. Still, no luck. I try various things around the switch /IAcceptSQLServerLicenseTerms, all in vain to no avail! The error message is the same.

I even poured through the documentation and everything looked good!


Then, I moved this switch to the beginning of the setup string and the message suddenly changed to invalid path in INSTANCEDIR and the messages were something like this:

The object state property ‘this.InstanceId’ is null/empty.

This is when I realized that the error had nothing to do with /IAcceptSQLServerLicenseTerms!

It is not about /IAcceptSQLServerLicenseTerms !! Where to look?

I decided to check-out the summary.txt referred to in the message. It is located in a path like this (depending on your version and setup parameters, this may vary)

C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20171005_195141\Summary_MYHOST_20171005_195141_GlobalRules.txt

When I inspected it, the values for everything looked good until, one of the entries jumped out with bad values:

INSTALLSHAREDDIR:              D:\Program Files\Microsoft SQL Server\
  INSTALLSHAREDWOWDIR:           D:\Program Files (x86)\Microsoft SQL Server\
  INSTALLSQLDATADIR:             <empty>
  INSTANCEID:                    <empty>
  INSTANCENAME:                  <empty>

Notice how the line “INSTANCEDIR” is all jumbled up?! That was the clue that the problem had nothing to with “/IAcceptSQLServerLicenseTerms”! In your case, it may be another value but the summary log file would definitely hold clues.

It complains about license terms because that is the first check it does and since it thinks that parameter is not there it complains about that. The real problem had to do with its mis-interpretation of INSTANCEDIR.

What I tried next? Take off the quotes

Equipped with that information, I tried changing the INSTANCEDIR to values like ‘D:\’, “D:”, ‘D:’, “D”, ‘D’ all without success. Then finally I tried D:\ without any quotes and that worked!

Here is the rub: if the path was something like “C:\MyInst”, it would have worked fine with or without quotes but with root-drive locations, it wants that parameter value specified without quotes, otherwise, it could not handle it. The documentation states that you can specify a value with or without quotes! This is certainly a bug and I want to file a connect item for it.

On a related note, if you are specifying the value without quotes, you have to replace spaces in the paths with comma  like C:\Program,Files


Please do make sure that the basics are still fine

  • The /IAcceptSQLServerLicenseTerms is present
  • There are no extra quotes or missing quotes or missing spaces
  • There are no typos

In your case, the problem can very well be that you are not using the /IAccept.. switch or something else but the clues will be in the summary file. Pour over that file and I am sure you will locate and fix your issue! Good luck.

Please add comments if this helped you so that others can benefit from it. If you had do more, I would appreciate if you added details about what you did to fix your problem.


3 thoughts on “SQL Server – Resolve “The /IAcceptSQLServerLicenseTerms command line parameter is missing or has not been set to true.”

  1. Thanks you for having this problem and solving it before me! I’m installing SQL Server 2014 through a WiX bootstrapper project and the customer recently decided they wanted the databases installed to a custom path. That worked great until they decided to use D:\ as the custom path.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s