Problem with CreateProcessAsUser( ) ? [modified]
-
Hello ALL, In one of my applications running under local user account, I need to spawn a process internally from system account.I was using OpenProcessToken () and was trying to collect token of winlogon.exe running under system account and was specifying flag as TOKEN_ALL_ACCESS but this fails. Also if I specify the FLAG as TOKEN_QUERY then I get the handle but then trying to CreateProcesswithUser resulted in Error "Access is denied". Can some body suggest me a solution through which I can spawn a new process through SYSTEM account when my process itself is running through a user account . Regards, Kushagra I hate to code but I luv to develop :)
modified on Friday, October 9, 2009 3:29 AM
-
Hello ALL, In one of my applications running under local user account, I need to spawn a process internally from system account.I was using OpenProcessToken () and was trying to collect token of winlogon.exe running under system account and was specifying flag as TOKEN_ALL_ACCESS but this fails. Also if I specify the FLAG as TOKEN_QUERY then I get the handle but then trying to CreateProcesswithUser resulted in Error "Access is denied". Can some body suggest me a solution through which I can spawn a new process through SYSTEM account when my process itself is running through a user account . Regards, Kushagra I hate to code but I luv to develop :)
modified on Friday, October 9, 2009 3:29 AM
Kushagra Tiwari wrote:
I was using OpenProcessToken () and was trying to collect token of winlogon.exe running under system account and was specifying flag as TOKEN_ALL_ACCESS but this fails.
The API documentation states that you could call GetLastError()[^] to get extended information on the reason for failure. Have you tried that?
It is a crappy thing, but it's life -^ Carlo Pallini
-
Kushagra Tiwari wrote:
I was using OpenProcessToken () and was trying to collect token of winlogon.exe running under system account and was specifying flag as TOKEN_ALL_ACCESS but this fails.
The API documentation states that you could call GetLastError()[^] to get extended information on the reason for failure. Have you tried that?
It is a crappy thing, but it's life -^ Carlo Pallini
I got "Access is denied" (using getlasterror())error while trying to call openprocesstoken as I already mentioned. But some how I want to spawn a process through system account while my base process is running under user account. Kushagra