title: MongoDB: Setting up Windows Service
body: <p>I have just installed MongoDB 2.6 and I am trying to run it as a Windows Service on Windows 8, by following the instructions at <a href="http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/">http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/</a>.</p>
  
  <p>Here's my directory structure within the C drive:</p>
  
  <ul>
  <li><code>MongoDB</code> (MongoDB installation)
  <ul>
  <li><code>bin</code></li>
  </ul></li>
  <li><code>Project</code>
  <ul>
  <li><code>DB</code></li>
  <li><code>Log</code></li>
  <li><code>mongo.conf</code></li>
  <li><code>mongod.cfg</code></li>
  </ul></li>
  </ul>
  
  <p>The contents of <code>mongo.conf</code> is:</p>
  
  <pre><code>storage:
     dbPath: "C:\Project\DB"
  </code></pre>
  
  <p>And the contents of <code>mongod.cfg</code> is:</p>
  
  <pre><code>logpath="C:\Project\Log\mongo.log" 
  </code></pre>
  
  <p>As directed to in the tutorial, from the command line (in administrator mode) I then type:</p>
  
  <p><code>"C:\MongoDB\bin\mongod.exe" --config "C:\Project\mongod.cfg" --install</code></p>
  
  <p>However, I get an error message:</p>
  
  <p><code>SEVERE: Failed global initialization: FileNotOpen Failed to open ""C:\MongoDB\bin\Project\Log\mongo.log""</code></p>
  
  <p>Please can somebody explain what I'm doing wrong? I've followed the instructions as dictated in the tutorial (except changed some of the directory names).</p>
  
  <p>I'm also very confused as to the difference between <code>mongo.conf</code> and <code>mongod.cfg</code>...</p>
  
  <p>Thanks!</p>