在bat文件第一行添加: title mongodb-27017 mongod -f D:\mongodb\mongod.conf 参考: https://www.jb51.net/article/151923.htm