SHGetSpecialFolderPath and SHGetKnownFolderPath!

Hello, i use Visual Studio 2013 and MFC
if i call direct my compiled exe and we give a trace for this function, i will found the right directory like this:
SHGetSpecialFolderPath --> C:\User\XY\AppData\Roaming
SHGetKnownFolderPath --> C:\User\XY\AppData\Local
but if i call this as service i obtain wrong directory:
SHGetSpecialFolderPath-->C:\Windows\system32\config\systemprofile\AppData\Roaming
SHGetKnownFolderPath-->C:\Windows\system32\config\systemprofile\AppData\Local
what musst be do to obtain the right directory like C:\User\XY\AppData\Roaming and C:\User\XY\AppData\Local?
thanks
Topic archived. No new replies allowed.