title: NSSM not starting a simple service
body: <p>I have following in a windows batch file, that I want to execute at startup, so I have created a service using <a href="http://nssm.cc/" rel="nofollow">NSSM</a>. </p>
  
  <pre><code>start /min cmd /k
  mongod --dbpath "D:\weather_station\weather_data" --repair
  mongod --dbpath "D:\weather_station\weather_data"
  </code></pre>
  
  <p>I do this to start the mongodb server for my nodejs application. </p>
  
  <p>I get an error: </p>
  
  <pre><code>Unexpected status SERVICE_PAUSED in response to START control
  </code></pre>
  
  <p>and in the files for I/O redirection (nssm logs), I get "'mongod' is not recognized as an internal or external command,operable program or batch file."</p>
  
  <p>Now this script runs fine, if I directly execute it from windows, and mongod is installed and works fine. </p>
  
  <p>I dont know, why nssm wont open a new command prompt and execute this service. </p>
  
  <p>Is this the best way to start the mongodb server as a windows service ?</p>