Dưa Hấu
Dưa Hấu
CC#
Created by Dưa Hấu on 9/21/2024 in #help
.NET
var process = new Process();
var start = new ProcessStartInfo()
{
CreateNoWindow = false,
UseShellExecute = false,
RedirectStandardOutput = true,
FileName = @"adb\adb.exe",
Arguments = "-s " + deviceID + " shell screencap -p",
Verb = "runas"
};

process.StartInfo = start;
process.Start();
var stream = process.StandardOutput.BaseStream;
var process = new Process();
var start = new ProcessStartInfo()
{
CreateNoWindow = false,
UseShellExecute = false,
RedirectStandardOutput = true,
FileName = @"adb\adb.exe",
Arguments = "-s " + deviceID + " shell screencap -p",
Verb = "runas"
};

process.StartInfo = start;
process.Start();
var stream = process.StandardOutput.BaseStream;
+ ExitCode 'process.ExitCode' threw an exception of type 'System.InvalidOperationException' int {System.InvalidOperationException}
4 replies