在无人参与的MongoDB安装过程中跳过Compass的安装

时间:2018-04-06 06:34:12

标签: mongodb chocolatey

我使用chocolatey包以无人参与模式安装MongoDB,安装程序也尝试安装CompassCompass的安装是通过下载msi来完成的,但链接已断开且下载失败。结果是整个包裹都没有安装。我查看了MongoDB的文档,但我找不到任何关于跳过安装Compass的参数的信息。有人知道是否有一个未记录的参数可以跳过它吗?

MSI (s) (5C:C0) [11:33:29:831]: Executing op: CacheSizeFlush(,)
MSI (s) (5C:C0) [11:33:29:831]: Executing op: ActionStart(Name=InstallCompassScript,Description=Installing MongoDB Compass... (this may take a few minutes),)
MSI (s) (5C:C0) [11:33:29:847]: Executing op: CustomActionSchedule(Action=InstallCompassScript,ActionType=1025,Source=BinaryData,Target=WixQuietExec64,CustomActionData="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "& 'C:\Program Files\MongoDB\Server\3.6\bin\InstallCompass.ps1' ; exit $($Error.Count)")
MSI (s) (5C:80) [11:33:29:847]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIF4B0.tmp, Entrypoint: WixQuietExec64
MSI (s) (5C:EC) [11:33:29:847]: Generating random cookie.
MSI (s) (5C:EC) [11:33:29:847]: Created Custom Action Server with PID 2952 (0xB88).
MSI (s) (5C:50) [11:33:29:878]: Running as a service.
MSI (s) (5C:50) [11:33:29:878]: Hello, I'm your 32bit Impersonated custom action server.
WixQuietExec64:  Downloading Compass from https://compass.mongodb.com/api/v2/download/latest/compass-community/stable/windows
WixQuietExec64:  Invoke-WebRequest : The remote server returned an error: (404) Not Found.
WixQuietExec64:  At C:\Program Files\MongoDB\Server\3.6\bin\InstallCompass.ps1:35 char:1
WixQuietExec64:  + Invoke-WebRequest -Uri $CompassUrl -OutFile $CompassExe
WixQuietExec64:  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WixQuietExec64:      + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) , WebExc
WixQuietExec64:     eption
WixQuietExec64:      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
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)
MSI (s) (5C:C0) [11:33:30:847]: Note: 1: 2265 2:  3: -2147287035
MSI (s) (5C:C0) [11:33:30:847]: User policy value 'DisableRollback' is 0
MSI (s) (5C:C0) [11:33:30:847]: Machine policy value 'DisableRollback' is 0
Action ended 11:33:30: InstallFinalize. Return value 3.

3 个答案:

答案 0 :(得分:1)

如果你下载msi文件并运行下一个命令,它应该可以工作:

msiexec.exe  /qn /i mongodb-win32-x86_64-2008plus-ssl-3.6.*-signed.msi SHOULD_INSTALL_COMPASS=0

msiexec.exe 
    /qn 
    /i mongodb-win32-x86_64-2008plus-ssl-3.6.*-signed.msi
    SHOULD_INSTALL_COMPASS=0

其中*是您想要/需要安装的3.6版本的revisión

答案 1 :(得分:0)

我对3.6.0有同样的问题,但是3.4.7可以正常安装。

也许当4.x Chocolatey软件包可用时,它会很好地工作。

答案 2 :(得分:-1)

有人解决了这个问题吗?

我运行的命令是choco install MongoDB --version 3.6.0。

如果我在选中指南针的情况下手动运行安装程序,它也会失败。如果我取消选中指南针,我没有问题。

我们可以添加一个强制choco忽略指南针的命令吗?