The following code here does exactly what I need:
ProcessStartInfo processStartInfo = new ProcessStartInfo("path", "args"); processStartInfo.Verb = "runas"; using (Process process = new Process()) { process.StartInfo = processStartInfo; process.Start(); process.WaitForExit(); }
So actually you need to install "runas" on ProcessStartInfo.Verb. With an attached manifest, this code now works fine in Windows XP, Vista, and 7.
Update:
See also this answer to a similar question . This is basically the same code, just using arguments.
Marc
source share