public static void NotePad(string str) { var guidName = Guid.NewGuid().ToString().Replace("-", "") + ".txt"; var fi = new FileInfo(Path.Combine(TempDir.FullName, guidName)); File.WriteAllText(fi.FullName, str); var notepadExe = new FileInfo(@"C:\Program Files (x86)\Notepad++\notepad++.exe"); if (!notepadExe.Exists) { notepadExe = new FileInfo(@"C:\Program Files\Notepad++\notepad++.exe"); } if (!notepadExe.Exists) { notepadExe = new FileInfo(@"C:\Windows\System32\notepad.exe"); } ExecutableRunner.RunExecutable(notepadExe.FullName, fi.FullName, TempDir.FullName); }
public static void KDiff3(FileInfo oldFi, FileInfo newFi) { var kdiffExe = new FileInfo(@"C:\Program Files (x86)\KDiff3\kdiff3.exe"); var result = ExecutableRunner.RunExecutable(kdiffExe.FullName, oldFi.FullName + " " + newFi.FullName, TempDir.FullName); }