In this example, an interactive process is created by a Windows service.
Before calling CreateProcessAsUser, you need to set the session ID by SetTokenInformation with TokenSessionId. And this call requires the Act As Part Of the Operating System privilege (SE_TCB_NAME, SeTcbPrivilege).
To simplify the code, suppose we have an ID of the running process (dwProcessId) as well as the name of its executable (sImageName). Also, the environment block, the priority required, and the command line are ignored.
No comments:
Post a Comment