Here's one way:
Process process = new Process();
ProcessStartInfo info = new ProcessStartInfo{FileName = "notepad",
UserName = "admin",
Domain = "",
Password = "myAdminPassword",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true
};
process.Start(info);
You can also set the
Process.Verb
property to "runas", and go from there.