I've found some C# code online to impersonating a user and it appears to work fine as when I call 'WindowsIdentity.GetCurrent().Name' I get the impersonated users name.
However I then run an application via code and it's loaded using my details and not the impersonated user.
I'm running the application as the user is impersonated as such
sResult += "After impersonation: " + WindowsIdentity.GetCurrent().Name + "\r\n";
Process myProcess = new Process();
myProcess.StartInfo.FileName = ConfigurationSettings.AppSettings["Program"];
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start();
MessageBox.Show(this, sResult, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
This is the impersonation code I am using http://www.codeproject.com/Articles/4051/Windows-Impersonation-using-C
So how do I get this application to launch as the impersonated user?