How to add mongodb service under Windows 10?

  mongodb, question

The previous command was as follows:

mongod --logpath C:\mydatabase\logs.txt --logappend --dbpath C:\mydatabase --serviceName MongoDB --install

However, there is no prompt at the command line after the carriage return, and the service has not been successfully added.
I’ve tried some methods on the internet but they don’t work. is there any correct method available?

"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --config "C:\Program Files\MongoDB\Server\3.6\mongod.cfg" --install
 net start MongoDB
 Pay attention to your version 3.4
 This is the official operation method. My system is also win10, which is normally used in mongoDb.