1
ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd", "/c " +"processNeedToRun")
{
RedirectStandardError = true,
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,
Verb ="runas"
};
我使用上面的代碼通過cmd在C#運行的過程。C#如何通過管理員運行進程(帶參數)升高CMD
然而,問題是:
- 「processNeedToRun」 運行時需要的參數。
- 即使我設置Verb =「runas」,Windows 7仍會提示提升對話框。
是否可以滿足所有要求?
非常感謝! – Xiwen 2011-01-14 03:15:29