Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12327

Add Binaries to %PATH% During Windows Installation

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual, Server
    • Labels:


      To use server binaries (mongo, mongod, mongorestore, etc.) from Command Prompt or PowerShell in Windows, you must either add the binary to your system path variable or provide the full binary path. The full path is unergonomic, error-prone, and doesn't match our MacOS/*NIX docs.

      Bad - Full Binary Path Name


      "C:\Program Files\MongoDB\Server\4.0\bin\mongod.exe" --dbpath="c:\data\db"


      Good - Binary in System %PATH%


      mongod --dbpath="c:\data\db"


      To add a binary to the system path:

      1. Navigate to Control Panel > System
      2. Click Advanced or Advanced Settings
      3. Click Environment Variables
      4. Find the Path system variable and click Edit
      5. Add the path of the installed binary folder to the list
      6. Save


      Scope of changes

      Fix, test, and backport to 3.4

            Unassigned Unassigned
            nick.larew@mongodb.com Nicholas Larew
            0 Vote for this issue
            4 Start watching this issue

              1 year, 23 weeks, 6 days ago