0

I am developing a Windows Forms app in c# that will make changes to a document and I want to include a button that will open the before and after in winmerge.

If it is possible, how do I do it?

More Detail:

I want to click a button Show Result with the starting file in the textbox. It should open winmerge and open this dialog with the original file on the left and updated file on the right.

So far I have:

    Process notePad = new Process();
    notePad.StartInfo.FileName = "WinMerge.exe";
    notePad.StartInfo.Arguments = txtIn.Text;
    notePad.Start();

The updated file is in the same directory as the input file one level down in a folder called "UPDATED"

c3f
  • 65
  • 1
  • 10
  • 2
    Hi - welcome to SO. Your question is a bit too open ended, making it less likely that someone will be able to help - please provide more specifics: are you looking for details on how to call winmerge from the command line? Perhaps you have a qeustion on how to use Winforms to provide a file editing GUI? Good luck! – Dan Ling Jul 10 '17 at 19:20

1 Answers1

5
String leftFilePath = "...";
String rightFilePath = "...";

string exe = "winmergeu.exe";
String args = $@"""{leftFilePath}"" ""{rightFilePath}""";

Process.Start(exe, args);