Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jan 2013
    Posts
    15

    Default BeyondCompare script returns code 100

    I'm calling a BeyondCompare script from a NAnt script. It compares Folder A with Folder B and copies diffs to Folder B. However, BCompare.exe would fail and return code 100, which is Unknown. Note that if I manually run the BeyondCompare script from the command-line then it works. Below is my script. What am I doing wrong?

    criteria binary version timestamp
    expand all

    load "C:\Folder A" "C:\Folder B"

    select left.newer.all left.older.all left.diff.all left.orphan.all
    copyto left path:base "C:\Folder B"

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,609

    Default

    It might help to put the expand command after the load command. You can also add the log command to your script to see if Beyond Compare logs any error information.

    log verbose c:\log.txt
    criteria binary version timestamp
    load "C:\Folder A" "C:\Folder B"
    expand all
    select left.newer.all left.older.all left.diff.all left.orphan.all
    copyto left path:base "C:\Folder B"
    Chris K Scooter Software

  3. #3
    Join Date
    Jan 2013
    Posts
    15

    Default

    Hi Chris,

    I put the expand command after the load command and added the log command to my script. However, nothing gets logged. I am still getting return code was 100.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,615

    Default

    Hello,

    If you set up a Portable install in a directory which every user would have read/write access (C:\Tools\Beyond Compare 4\) using our setup.exe, does this run via Nant scripting and/or command line?
    Aaron P Scooter Software

  5. #5
    Join Date
    Jan 2013
    Posts
    15

    Default

    Hi Aaron,

    Sorry for the late reply. I'm still experiencing return code 100 error via NAnt script. Please help.

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,615

    Default

    Hello,

    To confirm, you've created a Portable install in C:\Tools\? Which version of BC4 are you running?

    Double checking your NAnt script, can you output as text the string you are passing to the command line? What is this specific text? It should look like:
    "c:\tools\Beyond Compare 4\bcompare.exe" "@c:\tools\bcscript.txt"

    Also, as a test, does switching to "bcomp.com" instead of bcompare.exe, does this help?
    Aaron P Scooter Software

  7. #7
    Join Date
    Jan 2013
    Posts
    15

    Default

    Hi Aaron,

    I have BC4 installed at "F:\Program Files\Beyond Compare 4". It is version 4.0.6 (build 19729). Note that I had the same problem with BC3 and I was hoping upgrading to BC4 would resolve it, but it did not.

    The command looks something like this:
    [exec] Starting 'F:\Program Files\Beyond Compare 4\BCompare.exe (@"C:\Scripts\BeyondCompare_CopyDifferent.txt" "C:\Folder A" "C:\Folder B" "C:\Folder B" "C:\Logs\myLog.txt" \silent \closescript)' in 'C:\Scripts\'
    [exec] C:\Scripts\main.build(105,8): External Program Failed: F:\Program Files\Beyond Compare 4\BCompare.exe (return code was 100)

    The weird thing is if I run the above command in command prompt then it always works.

    I will test with "bcomp.exe", but what is the difference any way?

    Thanks.

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,615

    Default

    Hello,

    Can you paste in the exact text you run on the command line so I can double check it against the above script? One quick difference I notice is the placement of " after the @ instead of before.

    Also, BC 4.0.6 is pretty old at this point. The first troubleshooting step I would recommend is to upgrade to BC4.1.8. All 4.x updates are free for 4.x users, and we've fixed many various issues and several large enhancements, such as 64bit support.
    http://www.scootersoftware.com/downl...zz=v4changelog

    BComp.exe is not bcomp.com. Both work slightly differently, used in various automated solutions. bcomp.com is a console program which will wait after the command call on the console. bcomp.exe will wait if it is called graphically. bcompare.exe does not wait at all. Documentation for each is found in the Help file (F1) -> Command Line Reference chapter (near the bottom of the list). Scripting will usually wait regardless, and I would expect bcompare.exe to work, but as a troubleshooting step it is worth trying a quick re-run replacing bcompare.exe with bcomp.com to see if there is a impact. Also, please remove /silent and /closescript while we troubleshoot, as those will suppress any error messages and logging or prompts.

    Is F:\Program Files a Windows controlled Program Files location (which has the same UAC protection that C:\Program Files and C:\Program Files (x86) would have? If so, BC4's Portable Install would need to be moved, as the writing occurs in-directory in a Portable Install, and the UAC protection prevents this.
    Aaron P Scooter Software

  9. #9
    Join Date
    Jan 2013
    Posts
    15

    Default

    Hi Aaron,

    Can I send you my scripts in an e-mail instead of here?

    I tried to upgrade to BC4.1.8, but received this error: "The setup files are corrupted. Please obtain a new copy of the program."
    And I get this error if running the alternate installer: "The system administrator has set policies to prevent this installation."
    How do I go around it?

    Thanks for correcting me about the BComp.com. I did not know the existence of this file until now. I will switch to using it.

    UAC is turned off on our build server. We run BC as part of our automated build process and so we need to accept defaults automatically with no user interaction.

  10. #10
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,615

    Default

    Hello,

    Yes, but we aren't familiar with Nant specifically. I would like to see your working Command Line prompt so I can see if there's a difference, like the mentioned "@quote" placement. Also, we would need to troubleshoot with the latest release (4.1.8), so we'll want to get that installed and tested first.

    The first error indicates a corrupt download. Please clear your cache or switch webbrowsers and try again.
    The second error indicates you are in a protected environment that prevents the upgrade. Can you contact your IT department so they can elevate your privileges and get 4.1.8 installed?

    Even if UAC is disabled, it is not intended to install Beyond Compare's Portable Install directly into C:\Program Files. If F:\Program Files is also the same, Windows Protected and controlled folder, I would expect to see potential failures. Please re-install to a non-managed location. I recommended C:\Tools\ as the root of C:\ also sometimes has issues. C:\Tools\Beyond Compare 4\ would work for a Portable Install, which your IT staff should be able to get running with our Setup.exe; selecting Portable is one of the Wizard options presented during the initial install.
    Aaron P Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •