Win7: createprocess on session 1

Hi all,

How do I create process on session 1 under windows 7 environment? I have tried this flow:

LogonUser(...);
ImperesonateLoggedOnUser(...);
CreateProcessAsUser(...);

Unfortunately, I can run the application on session 1 instead it launches the application inside the interactive desktop window.

Any advise?

Thanks
From MSDN:
The process is run in the session specified in the token. By default, this is the same session that called LogonUser. To change the session, use the SetTokenInformation function.


SetTokenInformation(): http://msdn.microsoft.com/en-us/library/windows/desktop/aa379591(v=vs.85).aspx

TOKEN_INFORMATION: http://msdn.microsoft.com/en-us/library/windows/desktop/aa379626(v=vs.85).aspx
Topic archived. No new replies allowed.