title: How to run PostgreSQL as a service in windows?
body: <p>I installed postgreSQL binaries in windows 7 32bit operating system; I can start the server from cmd but <strong>I cant run it as a windows service.</strong></p>
  
  <p><strong>This is the error that I'm getting when I try to start the service manually:</strong></p>
  
  <pre><code>"The postgreSQL service on local computer started and then stopped. some services stop automatically if they are not in use by other servces or programs"
  </code></pre>
  
  <p>All I need to do is; after booting to windows when I double clicked my java application I need to run my app smoothly without any database errors. I cannot do this because postgreSQL is not running as a windows service.</p>
  
  <p><strong><em>I found this in windows event viewer:</em></strong></p>
  
  <pre><code>The description for Event ID 0 from source PostgreSQL cannot be found.
  Either the component that raises this event is not installed on your local computer or the installation is corrupted.
  You can install or repair the component on the local computer.
  
  If the event originated on another computer, the display information had to be saved with the event.
  
  The following information was included with the event: 
  
  postgres cannot access the server configuration file 
  "C:/Windows/system32/pgsql/data/postgresql.conf": No such file or directory
  </code></pre>
  
  <p>I googled about it but I was not able to find an answer.</p>