March 4th, 2009, 03:15 PM
Finding the user that owns a process.
I have OpenProcess(...) and OpenProcessToken(...) and I can get all sorts of information about a process, except the user name of who's process it is.
Basically this is part of a long painful process of figuring out how to launch a program as another user (you do not have their user-name or password). I have found out that ImpersonateUser() doesn't allow me to launch things as that other user for reasons I do not understand.
Currently I need to load the users profile, but for that to work I need the username and I do not know how to get it. Any help would greatly be appreciated.
Click Here to Expand Forum to Full Width