Skip to content

Commit 9c58416

Browse files
author
Anthony Sansone
committed
Updated commands for command line.
1 parent 44afbfb commit 9c58416

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

source/includes/steps-configure-windows-service-for-mongodb.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ action:
2929
language: powershell
3030
copyable: true
3131
code: |
32-
"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg" --install
32+
"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe" ^
33+
--config "C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg" ^
34+
--install
3335
post: |
3436
To use an alternate :setting:`dbpath`, specify the path in the
3537
configuration file (e.g. ``C:\mongodb\mongod.cfg``) or

source/includes/steps-create-manually-windows-service-for-mongodb.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ action:
6262
language: powershell
6363
copyable: true
6464
code: |
65-
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"
65+
sc.exe create MongoDB ^
66+
binPath= "\"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe\" ^
67+
--service --config=\"C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg\"" ^
68+
DisplayName= "MongoDB" start= "auto"
6669
post: |
6770
``sc.exe`` requires a space between "=" and the configuration values
6871
(eg "binPath= "), and a "\\" to escape double quotes.

0 commit comments

Comments
 (0)