Possible Duplicate:
Process.Start() impersonation problem
I am trying to run a console application as a different user in c#, but I am having trouble. Here is part of my code:
public void encryptPGP(string fileName)
{
string sCommandLine = "" +
"--recipient \"User Name <username@domain.com>\" --encrypt \"" + fileName + "\"";
System.Diagnostics.Process.Start("C:\\Utilities\\GnuPG\\App\\gpg.exe", sCommandLine);
}
... I need to have the C:\Utilities\GnuPG\App\gpg.exe ran by a certain user. How would I add that in?
This will be used in a web application.
Thanks!