。我试图在未连接到Internet的Window服务器上自动安装MongoDB Community Edition 3.6.2。
问题是由于在流程结束时尝试下载Compass工具集,MSI安装失败。由于我不需要安装Compass,我想我应该能够禁用此功能的安装。
但是,当我通过命令行传递只安装特定的MongoDb功能时,根据documentation,
msiexec.exe
/qn
/i mongodb-win32-x86_64-2008plus-ssl-3.6.2-signed.msi
INSTALLLOCATION="C:\Program Files\MongoDB\Server\3.6\"
ADDLOCAL=Server
/l*v MongoDBInstall.log
安装失败并出现以下错误(在MSEXEC错误日志中)。只要 ADDLOCAL 参数设置为 ALL
以外的任何值,就会发生错误WixQuietExec64: The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command WixQuietExec64: name, a script block, or a CommandInfo object. WixQuietExec64: At line:1 char:3
WixQuietExec64: + & '' ; exit $($Error.Count) WixQuietExec64: + ~~
WixQuietExec64: + CategoryInfo : InvalidOperation: (:String) , RuntimeException WixQuietExec64: + FullyQualifiedErrorId : BadExpression
WixQuietExec64:
WixQuietExec64: Error 0x80070001: Command line returned an error.
WixQuietExec64: Error 0x80070001: QuietExec64 Failed
WixQuietExec64: Error 0x80070001: Failed in ExecCommon method
CustomAction InstallCompassScript returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
之前有人见过这个,并有解决方案吗?
答案 0 :(得分:3)
答案 1 :(得分:2)
我刚遇到这个问题并检查日志。我找到了属性SHOULD_INSTALL_COMPASS
。
所以试试这个命令:
msiexec.exe
/qn
/i mongodb-win32-x86_64-2008plus-ssl-3.6.2-signed.msi
INSTALLLOCATION="C:\Program Files\MongoDB\Server\3.6\"
ADDLOCAL=Server
SHOULD_INSTALL_COMPASS=0
/l*v MongoDBInstall.log