From 1d5d7b265e9a7488f6d99e2bd5b392f4dba67b8b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 10 Jun 2018 15:11:25 -0700 Subject: [PATCH] Remove one unnecessary batch file creation step --- MainWindow.xaml.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 8842e450..905658fe 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -89,13 +89,14 @@ namespace DICUI { case KnownSystem.MicrosoftXBOXOne: case KnownSystem.SonyPlayStation4: - // TODO: Direct invocation of program instead of via Batch File - using (StreamWriter writetext = new StreamWriter("XboneOrPS4" + guid + ".bat")) - { - writetext.WriteLine("sg_raw.exe -v -r 4100 -R " + driveLetter + ": " + "ad 01 00 00 00 00 00 00 10 04 00 00 -o \"PIC.bin\""); - } - Process processXboneOrPS4 = new Process(); - processXboneOrPS4.StartInfo.FileName = "XboneOrPS4" + guid + ".bat"; + Process processXboneOrPS4 = new Process() + { + StartInfo = new ProcessStartInfo() + { + FileName = "sg_raw.exe", // TODO: Make this configurable + Arguments = "-v -r 4100 -R " + driveLetter + ": " + "ad 01 00 00 00 00 00 00 10 04 00 00 -o \"PIC.bin\"" + }, + }; processXboneOrPS4.Start(); processXboneOrPS4.WaitForExit(); break;