-1
可能重複:
Process.Start() impersonation problemC#運行控制檯應用程序不同的用戶...模擬
我試圖運行控制檯應用程序,在C#中的不同用戶,但我遇到麻煩。這裏是我的代碼部分:
public void encryptPGP(string fileName)
{
string sCommandLine = "" +
"--recipient \"User Name <[email protected]>\" --encrypt \"" + fileName + "\"";
System.Diagnostics.Process.Start("C:\\Utilities\\GnuPG\\App\\gpg.exe", sCommandLine);
}
...我需要有C:\工具\的GnuPG \軟件\ gpg.exe跑到某個用戶。我將如何添加?
這將用於Web應用程序。
謝謝!