After building a service that launches an interactive processes in a user's session via CreateProcessAsUser and lpDesktop specified in STARTUPINFO -- is it possible to change the session that a process is executing in on the fly?
So if we have notepad running in Session 1 and another user logged onto the same machine in Session 2, can we change Notepad's ProcessId from 1 to 2? I understand the well-followed and sane way to accomplish this is to just start notepad in Session 2, but can we use API calls to make it happen?
By the way I'm writing in C# but am entirely comfortable using pInvoke or low level languages.
It is not possible to move a running process from one session to another.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With