2

I'm trying to install sqlcmd in silent mode but i can't figure out how to automatically accept the EULA. The file I'm trying to install is named "MsSqlCmdLnUtils.msi" (downloaded from the MS download center). Here's what I've tried till now (found with google):

msiexec /i "MsSqlCmdLnUtils.msi" /passive AcceptEndUserLicenseAgreement=1
msiexec /i "MsSqlCmdLnUtils.msi" /passive ACCEPTEULA=1
msiexec /i "MsSqlCmdLnUtils.msi" /passive ACCEPT=1
msiexec /i "MsSqlCmdLnUtils.msi" /passive EULA=1

and also all combinations with "=yes" instead of "=1"

All I'm getting is ERRORLEVEL 1603 (Error 1603: A fatal error occurred during installation.)

Any ideas?

MichaelS
  • 5,941
  • 6
  • 31
  • 46

2 Answers2

11

After several hours of desperation I've finally figured out what to do. The property I was looking for is "IACCEPTMSSQLCMDLNUTILSLICENSETERMS=YES" and "IACCEPTMSSQLCMDLNUTILSLICENSETERMS=1" works as well.

So here's the command:

msiexec /i "MsSqlCmdLnUtils.msi" /passive IACCEPTMSSQLCMDLNUTILSLICENSETERMS=YES

THX @ Microfost for the great documentation -.-

MichaelS
  • 5,941
  • 6
  • 31
  • 46
  • Seven years later, after much wailing and gnashing of teeth: for some reason I cannot fully understand, I had to surround the EULA statement with double quotes to get it to work, as in: `msiexec /i "MsSqlCmdLnUtils.msi" /passive /qn /log ./sqlcmd4.txt "IACCEPTMSSQLCMDLNUTILSLICENSETERMS=YES"` I was performing a very similar installation, using the exact same syntax, for the precursor to this tool (ODBC Driver for SQL 17) which requires a very similar switch (an all captial letter statement swearing allegiance to the almighty EULA) and it did not require quoting. – Formica Apr 28 '21 at 15:15
0

I don't know what error 1603 is caused by, perhaps the command line, but I can find no evidence in the actual MSI file that those are the property names. The only property in the MSI file that deals with the EULA is named AgreeToLicense and its value needs to be Yes, not an integer 1. The values seem to be case-sensitive.

PhilDW
  • 20,260
  • 1
  • 18
  • 28