title: Current Directory of a VB.net Windows Service
body: <p>For some reason the Current Directory of my windows service is C:\Windows\System32
  and when I schedule my service I get this error Access is Denied.</p>
  
  <p>In one of the blogs I saw this peice to change the current directory.
  But I am not sure where to place this code.</p>
  
  <p>Thanks</p>
  
  <pre><code> System.IO.Directory.SetCurrentDirectory(System.AppDomain.CurrentDomain.BaseDirectory)
  </code></pre>