Trying to start process with another access token, without success, it runs as the non-impersonated user.
using (WindowsIdentity identity = new WindowsIdentity(token))
using (identity.Impersonate())
{
Process.Start("blabla.txt");
}
How to make this work properly?
You need to set the ProcessStartInfo.UserName and Password properties. With UseShellExecute set to false. If you only have a token then pinvoke CreateProcessAsUser().
Try this example from http://msdn.microsoft.com/en-us/library/w070t6ka.aspx
You can also use CreateProcessAsUser windows function.
http://www.pinvoke.net/default.aspx/advapi32/createprocessasuser.html