CaMiX
CaMiX

Reputation: 750

Switch Existing Process To Another User Using .Net/C# or WinAPI?

Is there a way to switch an existing user's process (that's running as user x) to another user (user y) in .Net/C#? Now I'm not referring to impersonating a user and executing a new process on their behalf. I'm referring to the possibility of handing over a running process to another user, programmatically, without having to re-execute the process/application as the new user.

Upvotes: 2

Views: 270

Answers (1)

David Heffernan
David Heffernan

Reputation: 612993

No this cannot be done. The user token is assigned as part of the process creation mechanism and is then fixed for the duration of that process. This is one of the reasons why UAC elevation has to involve separate processes.

Upvotes: 5

Related Questions