When creating a new process with the following code, an exception is raised that the operation requires elevation. Is there a way to allow Process.Start to use a different user's credentials to start the process even if the current user is not an administrator?
private Process CreateProcess(string path, string username, SecureString password, string domain)
{
Process proc = new Process();
proc.StartInfo.FileName = path;
proc.StartInfo.UserName = username;
proc.StartInfo.Password = password;
proc.StartInfo.Domain = domain;
proc.StartInfo.LoadUserProfile = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.ErrorDialog = true;
return proc;
}