I'm running a program coded in C# where it runs some commands using the code below:
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.CreateNoWindow = true;
startInfo.RedirectStandardOutput = true;
startInfo.UseShellExecute = false;
startInfo.FileName = "C:\\Program Files\\Microvirt\\EmuManager.exe";
startInfo.Arguments = "guestproperty enumerate Emu";
process.StartInfo = startInfo;
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
return output;
Since my application is running with Admin Rights, when I run the code above it uses the admin rights on it, but, for some reason, EmuManager.exe does NOT work if running with admin rights.
So I need a way to run that command without admin rights from my C# application that is running with admin rights and get its output.