title: c# service: how to get user profile folder path
body: <p>I need to get the user directory from within a C# windows service...<br>
  ...like C:\Users\myusername\<br>
  Ideally, I'd like to have the roaming path...<br>
  ...like C:\Users\myusername\AppData\Roaming\<br>
  When I used the following in a console program I got the correct user directory...  </p>
  
  <pre><code>System.Environment.GetEnvironmentVariable("USERPROFILE"); 
  </code></pre>
  
  <p>...but when I use that same variable in a service, I get...<br>
  C:\WINDOWS\system32\config\systemprofile<br>
  How can I get the user folder and maybe even the roaming folder location from a service?<br>
  Thanks in advance.</p>