Windows Service --install option isn't quoting all file parameters

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.1.0
    • Affects Version/s: 2.0.7
    • Component/s: Build
    • Environment:
      Windows install as a service
    • Fully Compatible
    • Windows
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When setting up mongod.exe to run as a service on Windows by specifying the --install command line switch, the --dbpath and --logpath options are correctly quoted when reinserted into the command line that gets set up to be run by the Windows Service Controller. --config, --pidfilepath and perhaps others need the same quoting treatment, otherwise paths and filenames that contain spaces will mess up the parsing of the command line, leading to mongod services that don't start or don't start correctly.

      User's command line:

      mongod --install --dbpath "C:\My mongo folder" --pidfilepath "C:\My mongo folder\pidfile"
      

      Resulting command line:

      "C:\My mongo folder\mongod.exe" --dbpath "C:\My mongo folder" --pidfilepath C:\My mongo folder\pidfile --service
      

      Without quotes (reinserted) around C:\My mongo folder\pidfile , this is not going to work.

              Assignee:
              Tad Marshall
              Reporter:
              Tad Marshall
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: