title: Get user appdata path from windows service by running service under local profile
body: <p>I have a windows application. In that i have retrieved appdata using environment variable. So it gives me following path</p>
  
  <p>c:\document and settings\current user name\application data.</p>
  
  <p>But when I retrieve the appdata path from windows service using environment variable i get following path</p>
  
  <p>c:\windows\ServiceProfiles\LocalService\AppData\Local</p>
  
  <p>so this appdata path is different from appdata path that i got from windows application environments variable appdata path. </p>
  
  <p>I m running windows service under local profile. I know that if i change service profile to run under user then service appdata path and windows application appdata path matches but service prompts for username and password. </p>
  
  <p>so my question is how to get user appdata path from service by running service under local profile without prompting for username and password?</p>