如何在具有管理權限的c#中啓動進程? 我使用的代碼爲:如何啓動具有管理權限的進程
Process p = new Process();
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.StartInfo.FileName = path;
p.StartInfo.UseShellExecute = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
if (System.Environment.OSVersion.Version.Major >= 6)
{
p.StartInfo.Verb = "runas";
}
p.Start();
仍然無法正常工作。請幫助我。
感謝
爲該進程提供所需的用戶權限.. – 2012-07-11 10:58:36
可能的重複[如何在C#中以管理員模式啓動進程](http://stackoverflow.com/questions/2532769/how-to -start-A-過程-AS-管理員模式在-C-尖銳) – 2012-07-11 11:03:17