【发布时间】:2012-07-11 10:52:07
【问题描述】:
如何在 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();
仍然无法正常工作。请帮帮我。
谢谢
【问题讨论】:
-
为您的用户授予该进程所需的权限..