title: Windows service - get current directory
body: <p>I have a Windows service that should look for a configuration file in its current directory.</p>
  
  <p>So I use <code>directory.getcurrentdirectiry()</code> but instead of the service directory I get back </p>
  
  <pre><code>c:\windows\system32
  </code></pre>
  
  <p>Any idea why and how should I get the service directory?</p>