If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

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.