OK, so I have a VB.NET app that shells out to Beyond Compare to compare a couple text files, in the context of Windows Forms application. With the change from BC2 to BC3, obviously hard-coding the "BC2.exe" command line isn't the right approach. Is there a registry value or someplace I can look to get the current command line for Beyond Compare that will work for both BC2 and BC3, and preferably, all future versions?
What I currently have looks like this; it was quick and dirty and worked at the time.
Private Shared Function GetCommandLine() As String
Dim CompareCommandExe As String = "BC2.exe"
Dim CompareCommandFolder As String = "C:\Program Files\Beyond Compare 2"
Dim CompareCommandArgs As String = "/FV "
Dim CompareCommandFilesOrFolders As String = "c:\source.txt c:\dest.txt"
GetCommandLine = """" & CompareCommandFolder & "\" & CompareCommandExe & """ " & CompareCommandArgs _
& " " & CompareCommandFilesOrFolders
End Function
What I currently have looks like this; it was quick and dirty and worked at the time.
Private Shared Function GetCommandLine() As String
Dim CompareCommandExe As String = "BC2.exe"
Dim CompareCommandFolder As String = "C:\Program Files\Beyond Compare 2"
Dim CompareCommandArgs As String = "/FV "
Dim CompareCommandFilesOrFolders As String = "c:\source.txt c:\dest.txt"
GetCommandLine = """" & CompareCommandFolder & "\" & CompareCommandExe & """ " & CompareCommandArgs _
& " " & CompareCommandFilesOrFolders
End Function
Comment