I need the program to give the output of the batch script, and at the moment it's just printing
System.IO.StreamReader
and it should be printing whatever the batch script says
This is only the part that has to do with starting a new process, the variables like the path to the file are declared and the script itself runs but doesn't show proper output
Process Uninstaller = new Process();
Uninstaller.StartInfo.FileName = Path.Combine(uninstalldirectory, BatchProcessFileName);
Uninstaller.StartInfo.UseShellExecute = false;
Uninstaller.StartInfo.CreateNoWindow = true;
Uninstaller.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
Uninstaller.StartInfo.RedirectStandardOutput = true;
Uninstaller.Start();
StreamReader ReadUninstallerOutput = Uninstaller.StandardOutput;
Uninstaller.Close();
string OutputEnd = ReadUninstallerOutput.ReadToEnd();
Console.WriteLine(ReadUninstallerOutput);
ReadUninstallerOutput.Close();
Console.WriteLine("Uninstallation Successful");