Announcement

Collapse
No announcement yet.

Remotely executing bc2.exe not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remotely executing bc2.exe not working

    Hi,

    I've written a batch file which does a bunch of 'stuff' and then calls bc2.exe to compare and generate reports. When I run this batch file on the machine it is supposed to be run on, it works fine.

    When I use psexec.exe to remotely run the batch file from a different machine, it does not work.

    I've used psexec a lot to run other files and it works fine. I'm positive it is not a configuration issue.

    So, to clarify, the batch file does get executed. All the stuff in the batch file works as it should (I log a lot of info and that is working). When it gets to the bc2.exe line, it doesn't seem to run it and work.

    The specifics of the line in the batch file look like this:

    Code:
    "C:\Program Files\Beyond Compare 2\BC2.exe" @C:\XYZ\CompareScirpt.txt %baselinefolder% %currentrun% /silent
    It's almost as if beyond compare just doesn't want to work when launched this way.

    [edit]
    I added logging to my BC script, and I have a line at the top of the bc script as follows:
    Code:
    Load "COMAPIWS_Session"
    which gives the error as follows:
    Code:
    6/12/2009 3:00:04 PM  >>   load "COMAPIWS_Session"
    6/12/2009 3:00:04 PM  Load Comparison:  <->
    6/12/2009 3:00:04 PM  Script Error: Unable to load base folder
    6/12/2009 3:00:04 PM  >> User Canceled
    6/12/2009 3:00:04 PM  Script completed in 0.00 seconds
    If I start BC up normally and choose this session, or if I run the batch file locally, it works fine.

    I know that psexec doesn't like UNC paths, and my session was using one. So what I did was reload my session and change the UNC path to a mapped drive (W). It still doesn't work. So I experimented with not using the session and just loading the left and right sides and this time I can see that it doesn't like the mapped drive either. The log file shows:

    Code:
    6/12/2009 3:23:58 PM  >>   log verbose "C:\Compare_Log.log"
    6/12/2009 3:23:58 PM  User name: sqlexec
    6/12/2009 3:23:58 PM  >>
    6/12/2009 3:23:58 PM  >>   #load "C:\COMWS_BeyondCompare_Script\COMAPIWS_Session"
    6/12/2009 3:23:58 PM  >>   criteria rules-based
    6/12/2009 3:23:58 PM  >>   load w:\COMAPIWS\CP2010\Baseline C:\COMWS_BeyondCompare_Script\CurrentRun
    6/12/2009 3:23:58 PM  The device is not currently connected but it is a remembered connection
    6/12/2009 3:23:58 PM  The device is not currently connected but it is a remembered connection
    6/12/2009 3:23:58 PM  Load Comparison:  <-> C:\COMWS_BeyondCompare_Script\CurrentRun
    6/12/2009 3:23:58 PM  Script Error: Unable to load base folder
    6/12/2009 3:23:58 PM  >> User Canceled
    6/12/2009 3:23:58 PM  Script completed in 0.02 seconds
    You can see that for some reason it doesn't recognize W either. Why would remotely running it cause it to not be able to load the base folder? I'm logging in as the same user?

    Any ideas?

    Thanks,

    Aracknid
    Last edited by Aracknid; 12-Jun-2009, 02:24 PM.

  • #2
    I worked around this issue by copying (in the batch file) all the baseline folder from the mapped drive location to the local drive and now it works. It is weird that BC didn't like the mapped drives when executed this way, but at least I was able to understand what the problem is and work around it.

    Aracknid.

    Comment


    • #3
      Hello,

      Depending on how this was executed, your mapped directories may not have been mapped to drive letters at the time of the scripts execution. If you use the \\computername\path instead of w:\, you may find you do not need to perform the copy.

      Your workaround method may have more access, or is able to kick off the mapping of the drive.
      Aaron P Scooter Software

      Comment


      • #4
        Hi,

        Actually, the drive letters are mapped at the time it runs. My batch file is able to copy files from the mapped drive prior to calling BC2.exe.

        As I mentioned, it works perfectly fine if I double-click the batch file on the machine myself. I've tried both UNC and mapped drives. I simply cannot get it to work.

        Aracknid

        Comment


        • #5
          I've got another update. Unfortunately, my workaround is NOT working. Not only does it not load my session, but I've also just discovered it doesn't use my rules either.

          Based on this, I've come to the conclusion that it is not possible to load a session AND rules remotely using psexe. It must either have something to do with the user that is remotely running the BC2.exe or the script cannot find the session and rules to load... anyway, that is a guess. I've tried many different things, and it will not work if I try to load a session. The user that is remotely running is the same user logged in when I run it directly.

          Is it possible to move the rules and session files into the Application Data folder for the user "All Users" and still have it loaded by BC? I've tried this and it doesn't seem to work... Any thoughts?

          Just a reminder. Everything works fine when I run it directly on the machine. It is only remotely executed that doesn't work.

          Aracknid.
          Last edited by Aracknid; 15-Jun-2009, 09:39 AM.

          Comment


          • #6
            You could change the BC2 install into a Portable install that stores registration and settings data within the install folder. Any user executing the bc2.exe will share the same settings.

            First, export your current settings (so you can re-import them once switched over).

            Place a BC2.xml and BC2.key file into the install folder to switch it into Portable mode.
            http://www.scootersoftware.com/suppo...vablemedia.php
            Aaron P Scooter Software

            Comment

            Working...
            X