ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd", "/c " +"processNeedToRun")
{
RedirectStandardError = true,
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,
Verb ="runas"
};
I use the above code to run a process through cmd in C#.
However, the problem is:
- "processNeedToRun" needs arguments when running.
- Even i set Verb ="runas", Windows 7 still prompts an elevate dialog.
Is it possible to meet all the requirements?