Installing sqlcmd in silent mode accepting EULA

天涯浪子 提交于 2019-12-14 03:26:34

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/24160513/installing-sqlcmd-in-silent-mode-accepting-eula

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!