I wrote a batch file that uses ADB methods that return output to the cmd window.
However, when I start this file as a process from my Windows Forms program (written in C#) the output returned isn't the one in the cmd window.
Example:
From the cmd window: "error: no devices/emulators found"
From the output string: "" (No output in this case, different cases- just part of the output).
Process process = new Process();
process.StartInfo.FileName = filePath;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
return output; // Not the same as the cmd window
How can I get the full output of this batch file?