I am developing a windows 2000 based print monitor for a fax software.
Therefore the monitor has to start a dialog for entering the destination
number. To start the dialog program the monitor uses
OpenTreadToken(), DuplicateTokenEx() and finally CreateProcessAsUser()
to start the exe.
All is going fine, the resulting process is running with the actual
username (can be validated in the task manager). But if this program is
calling SHGetSpecialFolderLocation() to examine CSIDL_LOCAL_APPDATA,
the resulting path is (in german windows)
C:\Dokumente und Einstellungen\localservice\.....
and not the expected
C:\Dokumente und Einstellungen\actual username\.....
Where is the mistake?
Regards, Hans-Peter