before i start... I realize that there were some issues like this one. But still,I can't find an answer that satisfies me. Down below, I placed my code:
private void run_cmd(string cmd, string args)
{
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = "cmd.exe";
start.Arguments = $"C:/Users/Ola/AppData/Local/Programs/Python/Python38/python.exe
{cmd} {args}"; // where these args come with parameters
start.UseShellExecute = false;
start.RedirectStandardOutput = true;
start.WindowStyle = ProcessWindowStyle.Hidden;
using (Process process = Process.Start(start))
{
using (StreamReader reader = process.StandardOutput)
{
string result = reader.ReadToEnd();
Console.Write(result);
}
}
}
Can anyone tell me this class does not work properly? The output is just blank cmd window.