Ad

Is It Possible To Impersonate A User Without Logging Him On?

- 1 answer

Is it possible to impersonate a user without supplying user name/password? Basically, I'd like to get the CSIDL_LOCAL_APPDATA for a user (not the current one) using the ShGetFolderPath() function. All I currently have is a SID for that user.

Ad

Answer

No, you have to call Win32 API LogonUser function to get windows account token back so you can then impersonate.

Ad
source: stackoverflow.com
Ad