9

I found exactly same question for RHEL: (my question is for Windows) Install ONLY mongo shell, not mongodb

Is there an Windows equivalent of: mongodb-org-shell

Can I copy the mongo.exe from a Server installation on another Windows machine?

sumon c
  • 739
  • 2
  • 10
  • 18

3 Answers3

6

On Windows, you can install per component using with the unattended installation option.

Once you've downloaded the .msi installer from MongoDB Download Centre. You can install just the mongo shell component using:

msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-3.6.5-signed.msi ^
        ADDLOCAL="Client"

See also Run the Windows Installer From the Windows Command Interpreter

Wan B.
  • 18,367
  • 4
  • 54
  • 71
  • Thanks! This exact command opened only the help msiexec.exe help menu for me but using the normal installer it is possible to just install the "mongo" shell. Don't install "Mongo Compass" though - it crashes the installer if the other components are not installed – Unchained Mar 14 '19 at 15:37
  • 1
    Ah it doesn't work. It cannot connect to anything because of missing utilities.... I now just installed 150MB of database to use a small shell :-| – Unchained Mar 14 '19 at 15:43
2

Upon executing the .msi installation file you can do a custom install of the specific components you want.

Mongo Download: https://www.mongodb.com/download-center/community

knowledgy
  • 33
  • 7
0

Here is my solution and it worked(just need 21MB space and you don't need to install anything.)

  1. Download Zip package for widnows edition (Here)
  2. un-zip the file
  3. get into the path "bin" and find mongo.exe(21MB).
  4. delete all of other files or you can copy mongo.exe to somewhere you wanted.
EricHe
  • 21
  • 4