From 9c5841627c251cc0189e777788fc3f98ce689156 Mon Sep 17 00:00:00 2001 From: Anthony Sansone Date: Tue, 5 Jun 2018 17:12:00 -0500 Subject: [PATCH] Updated commands for command line. --- .../steps-configure-windows-service-for-mongodb.yaml | 4 +++- .../steps-create-manually-windows-service-for-mongodb.yaml | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/includes/steps-configure-windows-service-for-mongodb.yaml b/source/includes/steps-configure-windows-service-for-mongodb.yaml index 9e6a4c8adf0..482269a2206 100644 --- a/source/includes/steps-configure-windows-service-for-mongodb.yaml +++ b/source/includes/steps-configure-windows-service-for-mongodb.yaml @@ -29,7 +29,9 @@ action: language: powershell copyable: true code: | - "C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg" --install + "C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe" ^ + --config "C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg" ^ + --install post: | To use an alternate :setting:`dbpath`, specify the path in the configuration file (e.g. ``C:\mongodb\mongod.cfg``) or diff --git a/source/includes/steps-create-manually-windows-service-for-mongodb.yaml b/source/includes/steps-create-manually-windows-service-for-mongodb.yaml index 16867305a65..12e54ba6002 100644 --- a/source/includes/steps-create-manually-windows-service-for-mongodb.yaml +++ b/source/includes/steps-create-manually-windows-service-for-mongodb.yaml @@ -62,7 +62,10 @@ action: language: powershell copyable: true code: | - sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg\"" DisplayName= "MongoDB" start= "auto" + sc.exe create MongoDB ^ + binPath= "\"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe\" ^ + --service --config=\"C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg\"" ^ + DisplayName= "MongoDB" start= "auto" post: | ``sc.exe`` requires a space between "=" and the configuration values (eg "binPath= "), and a "\\" to escape double quotes.