Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
CreateProcessAsUser fails in windows XP (from remote desktop - session 1)

So whether it is ok,
if i use session 0 to run an exe,
using a process, which is running in session 1 ?

I have used below code (winlogonPid is from session 0)

VB
hProcess = OpenProcess(MAXIMUM_ALLOWED, False, winlogonPid)
OpenProcessToken(hProcess, TOKEN_DUPLICATE, hPToken) 


then use DuplicateTokenEx and CreateProcessAsUser

Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900