Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Feb 2017
    Posts
    6

    Default

    Aaron,

    I have changed it to a Portable install, and I have also checked that the powershell command that invokes the BCompare.exe is running with elevated permissions, which it is.

    Contents of ReportComp.ps1

    function Compare-FilesBeyondCompare() {
    param([Parameter(Mandatory=$true)]$filePathA,[Parameter(Mandatory=$true)]$filePathB)

    $ps = new-object System.Diagnostics.Process
    $ps.StartInfo.Filename = "C:\Beyond Compare 3\BCompare.exe"
    $ps.StartInfo.Arguments = "/silent /fv=""Data Compare"" ""@c:\tmp\bscript.txt"" ""$filePathA"" ""$filePathB"" ""c:\tmp\Report.html"""
    #$ps.StartInfo.Arguments = "/qc ""$filePathA"" ""$filePathB"""
    $ps.start() |out-null
    $ps.WaitForExit()

    $rul = $ps.ExitCode -eq 2
    $exitCode = $ps.ExitCode

    Write-Host "$filePathA"
    Write-Host "rul=$rul, exitCode=$exitCode"


    <#$bin -eq $True -or $rul -eq $True#>
    $exitCode -lt 13

    }
    Compare-FilesBeyondCompare "c:\tmp\Ken.xls" "C:\tmp\Ryu.xls"

    Contents of bscript.txt
    data-report layout:summary options:ignore-unimportant title:"Data Report" output-to:"%3" output-options:html-color "%1" "%2"

    Using a powershell console on a different machine I then invoke ReportComp.ps1 script, the response of executing this PowerShell script from a remote machine is different than running the same ReportComp.ps1 from the machine that the script is located on.
    Invoke-Command -ComputerName xxxxxxxx -ScriptBlock { c:\ReportComp.ps1 }

    Are you able to try this from your end?

  2. #12
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,623

    Default

    Hello,

    I suggest removing /silent for troubleshooting purposes. Also, remove /fv=data, as that isn't used in conjunction with a @script call.

    I don't have much experience with Powershell, and don't have any experience attempting to run it remotely, so I don't think I'll be much help from that angle. If BC4 is called and using the same set of settings in a Portable Install (with BCState.xml and other .xml setting files in the same folder as BCompare.exe), then it should show the same results from the generated data-report script. Are you running the latest BC3.3.13 release?:
    http://www.scootersoftware.com/download.php?zz=dl3_en

    To help test if each Powershell call is accessing BC4 properly and has access to the correct settings folder, change the script to load a saved folder compare session by name. Create the Folder Compare session in the graphical interface, and give it a custom name: "saved Folder session". The script can then load by name:
    log verbose "c:\logs\bclog.txt"
    load "saved Folder session"

    If the log shows success, then that script call is using the same settings. If the session name load fails, then that call is accessing a different settings folder location, due to the nature of how you are calling it. A Portable Install should share settings with any Windows User that accesses that Portable Install. Can you verify that BCState.xml and other settings files are in the install folder?
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

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