When I use Win32 API CreateProcessAsUser() to execute a program with impersonated user in my C# .NET project, it was successful.
But I want implement that using .NET Framework API.
There is a similar method like System.Diagnostics.Process.Start() But it's not exactly same as CreateProcessAsUser().
The function CreateProcessAsUser() receives "hToken" at the first parameter. So when I duplicate a token and use it to that function, I can impersonate a user and execute a program with that user.
But the method System.Diagnostics.Process.Start() doesn't provide such a parameter.
If there is anyone who knows this, would you please let me know? Thanks
ProcessStartInfo has UserName and Password properties in NET 2.0 or greater.