Following is a simple vbScript to test a call to BC3.
If the files are different, BC3 opens. This is what I want to happen.
If the files are the same, the QuickCompare dialog opens.
I added the /silent parameter in an attempt to suppress this Quick Compare dialog. In other words, I don't want to see the dialog when the files are the same...I want BC3 to simply skip the compare and exit. I only want a BC3 to open a compare session when the files are different.
I realize that I can make two calls to BC3... A quickcompare call to set the return code followed up by a regular call to open a session based on the quickcompare exit code... but why call BC3 twice for a simple same/different check? It would be helpful if there were an /ignoresame parameter that would abort the GUI programmatically when the files are the same and only open a session when the files are different (or if the existing /silent parameter could be expanded to serve this purpose).
Code:
Option Explicit Dim WSHShell, BC3, LeftSide, RightSide, Result Set WSHShell = CreateObject("WScript.Shell") BC3 = """C:\Program Files\Beyond Compare 3\BComp.exe""" LeftSide = " ""D:\Test\Left.sql""" RightSide = " ""D:\Test\Right.sql""" Result = WSHShell.Run(BC3 + " /silent" + LeftSide + RightSide, 0, True) MsgBox Result
If the files are the same, the QuickCompare dialog opens.
I added the /silent parameter in an attempt to suppress this Quick Compare dialog. In other words, I don't want to see the dialog when the files are the same...I want BC3 to simply skip the compare and exit. I only want a BC3 to open a compare session when the files are different.
I realize that I can make two calls to BC3... A quickcompare call to set the return code followed up by a regular call to open a session based on the quickcompare exit code... but why call BC3 twice for a simple same/different check? It would be helpful if there were an /ignoresame parameter that would abort the GUI programmatically when the files are the same and only open a session when the files are different (or if the existing /silent parameter could be expanded to serve this purpose).
Comment