I downloaded the MSi MongoDB Windows program and successfully executed it.
The mongod.exe and mongo.exe batch files are executed.
The installation guide shows how to create a configuration file and then create a Windows Server using the command
sc.exe create MongoDB binPath= "\"C:\mongodb\mongod.exe\" --service --config=\"C:\mongodb\mongod.cfg\""
This creates a SUCCESS response.
Then the service starts
net start MongoDB
but it gives an answer
System Error 2 has occurred. The system cannot find the file specified.
The permission for those who need it is that the manual indicates the wrong default path for mongod.exe, which should be in the bin directory
C:\mongodb\bin\mongod.exe
So, although this is a question, I also solved it for the benefit of others who may have this problem.
Also, by default, MongoDB will be installed in C: \ Program Files on Windows, and you must use a custom installation to put it in C: \ mongodb.
source share