C:\Program Files\MongoDB
mkdir C:\data
C:\Program Files\MongoDB\bin\mongod --dbpath c:\data
echo logpath=C:\Program Files\MongoDB\mongod.log > "C:\Program Files\MongoDB\mongod.cfg" echo logappend=true >> "C:\Program Files\MongoDB\mongod.cfg" echo dbpath=C:\data >> "C:\Program Files\MongoDB\mongod.cfg" echo directoryperdb=true >> "C:\Program Files\MongoDB\mongod.cfg"
C:\Program Files\MongoDB\bin\mongod --config "C:\Program Files\MongoDB\mongod.cfg" --install
sc config mongodb start= demand