cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
Win7: createprocess on session 1
Win7: createprocess on session 1
Sep 10, 2012 at 1:54pm
Sep 10, 2012 at 1:54pm UTC
restless
(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
Sep 10, 2012 at 2:15pm
Sep 10, 2012 at 2:15pm UTC
Computergeek01
(5613)
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.