BeyondCompare script returns code 100

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TDN
    Journeyman
    • Jan 2013
    • 15

    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"
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    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

    Comment

    • TDN
      Journeyman
      • Jan 2013
      • 15

      #3
      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.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        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

        Comment

        • TDN
          Journeyman
          • Jan 2013
          • 15

          #5
          Hi Aaron,

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

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16000

            #6
            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

            Comment

            • TDN
              Journeyman
              • Jan 2013
              • 15

              #7
              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.

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 16000

                #8
                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

                Comment

                • TDN
                  Journeyman
                  • Jan 2013
                  • 15

                  #9
                  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.

                  Comment

                  • Aaron
                    Team Scooter
                    • Oct 2007
                    • 16000

                    #10
                    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

                    Comment

                    • TDN
                      Journeyman
                      • Jan 2013
                      • 15

                      #11
                      Hi Aaron,

                      I was able to download the update, but I cannot run it even with elevated privileges. I'm getting "The publisher cannot be verified" message.

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 16000

                        #12
                        Hello,

                        Which OS are you running, and are you referring to the 4.1.8 update via the internal Check for Updates dialog?

                        If you download a fresh copy of 4.1.8 from our website, does it install? http://www.scootersoftware.com/download.php
                        Aaron P Scooter Software

                        Comment

                        • TDN
                          Journeyman
                          • Jan 2013
                          • 15

                          #13
                          I'm on Win 7. I'm unable to install via the Check for Updates dialog and from the website.

                          Comment

                          • Aaron
                            Team Scooter
                            • Oct 2007
                            • 16000

                            #14
                            Hello,

                            You may have Internet Options locked down or is this a Windows Server OS? That error message is usually seen if the executable is run from a network location on a system with configured Internet Options -> Security. Is your User profile on a network location, downloaded to network location, or is F:\ local or remote?
                            Aaron P Scooter Software

                            Comment

                            • TDN
                              Journeyman
                              • Jan 2013
                              • 15

                              #15
                              Now I'm not even sure why I'm getting error 100 because it seems like it happens when processing many files. How can I troubleshoot this?

                              Comment

                              Working...