I have a windows application. In that i have retrieved appdata using environment variable. So it gives me following path
c:\document and settings\current user name\application data.
But when I retrieve the appdata path from windows service using environment variable i get following path
c:\windows\ServiceProfiles\LocalService\AppData\Local
so this appdata path is different from appdata path that i got from windows application environments variable appdata path.
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.
so my question is how to get user appdata path from service by running service under local profile without prompting for username and password?