CreateProcessWithTokenW
-
Can someone publish C# code to make use of CreateProcessWithTokenW function, so that i can run process just by getting token from current user, instead of passing user/pw for every run (WindowsIdentity.GetCurrent().Token) Basically trying to extend impersonation functionality to disconnected functions like Process.Start() Impersonation example: http://www.codeproject.com/csharp/zetaimpersonator.asp Many thanks.
-
Can someone publish C# code to make use of CreateProcessWithTokenW function, so that i can run process just by getting token from current user, instead of passing user/pw for every run (WindowsIdentity.GetCurrent().Token) Basically trying to extend impersonation functionality to disconnected functions like Process.Start() Impersonation example: http://www.codeproject.com/csharp/zetaimpersonator.asp Many thanks.
You may want to use
CreateProcessAsUser
instead. This[^] link shows how to do it.Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
-
You may want to use
CreateProcessAsUser
instead. This[^] link shows how to do it.Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
Thanks Pete, I need to use CreateProcessWithTokenW as to allow seemless impersonation; without having to manage credentials. I found an interesting site, but that also does not have a sample code for me...http://www.pinvoke.net/[^]