Tips and Tricks in a world of Mix

Archive for 05/07/2017

Image

Activate MongoDB from one bat file

  • Put this code in your bat file
  • It’ll start and activate the mongodb in 2 different admin privileged cmd windows.
  • Please check the paths before to adjust to your environment.

START “runas /user:administrator” cmd /K “cd C:\Program Files\MongoDB\Server\3.4\bin & mongod.exe –dbpath c:\data\db”

TIMEOUT /T 10 START

START “runas /user:administrator” cmd /K “cd C:\Program Files\MongoDB\Server\3.4\bin & mongo.exe “

Tag Cloud

%d bloggers like this: