开发者

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

开发者 https://www.devze.com 2023-04-03 15:53 出处:网络
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

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/applicat开发者_JAVA百科ion as the new user.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号