Hopefully an easy question but unfortunately the answer is proving elusive for me at present.
Running BeyondCompare version 3.3.13 build 18981.
The Setup
I have a windows scheduled event set up to trigger X actions and shift files around before comparing them and emailing the results out. I put it together on a Server 2003 machine and it has been happy chugging along for several years, but the machine needs to be retired so I'm moving it to a new machine (Server 2012R2).
In the old system it would run a bat file and call the following:
"D:\Program Files\Beyond Compare 3\BCompare.exe" @"D:\Reports\Exe\BeyondCompare.txt"
In the BeyondCompare.txt it contained the following:
load ignore-unimportant-session
criteria rules-based
load "D:\Reports\Master Copy" "D:\Reports\Latest"
expand all
select all.diff.files
text-report layout:side-by-side &
options:ignore-unimportant,display-mismatches &
output-to:"D:\Reports\Exe\Audit2.html" output-options:html-color
folder-report layout:summary &
options:display-mismatches output-to:"D:\Reports\Exe\Audit3.html" output-options:html-color
In the new machine (Server 2012R2 and now attempting to use Powershell) it was called using:
& "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "@`"D:\Reports\Exe\BeyondCompare.txt`"" | Write-output
#(The Write-output was used to make it wait until it was done before proceeding to send out the email etc.)
In the BeyondCompare.txt it contained exactly the as noted above (with the same folders/layout and share permissions as far as I can see).
The results/problem
If I manually run it, the completes without issue.
If I schedule it and remain signed in when it triggers it finishes without issue.
If I leave the schedule to run while I'm not signed in then it fails.
After turning on logging (log normal "D:\Reports\BeyondCompareLogging.txt") I saw the following (ditto with verbose):
27/04/2017 3:08:32 p.m. >> #Turn logging on.
27/04/2017 3:08:32 p.m. >> log normal "D:\Reports\BeyondCompareLogging.txt"
27/04/2017 3:08:32 p.m. >> load ignore-unimportant-session
27/04/2017 3:08:32 p.m. Load comparison: <->
27/04/2017 3:08:32 p.m. Fatal Scripting Error: Unable to load base folder
27/04/2017 3:08:32 p.m. Script completed in 0.05 seconds
However when I run it manually it completes without issue, and the same set-up (as far as I can tell) is still running/completing without issue on the old Server 2003 machine.
If I comment out the #load ignore-unimportant-session line it completes, but the email is now huge (as there are quite a few rules about what can be ignored - though this has been set as default so could this be improved somehow on my part?)
Things I've tried/checked:
I tried altering "criteria rules-based" to include the "ignore-unimportant" e.g. criteria rules-based ignore-unimportant but I suspect this is an improvement that is only present/available for v4 as it seems to be disliked by v3.
The scheduled event on both machines is the same and running as myself with my credentials and set to run even if no one is signed in. It has also been set to run with the highest privileges and the action written as PowerShell.exe -File "D:\Reports\Copy to Reports.ps1".
I altered everything to use UNC pathing and shared relevant root parent folders etc.
Tried calling it using more pure Powershell (after getting help from others):
Write-Output "Running BeyondCompare"
$process="${Env:ProgramFiles(x86)}\Beyond Compare 3\BCompare.exe"
$args="@`"$targetDirectory\Exe\BeyondCompare.txt`" "
Write-Output $process $args
Start-Process $process -ArgumentList $args -Wait
Write-Output "BeyondCompare has finished"
I tried incorporating the ignore-unimportant option into:
folder-report layout:summary &
options:display-mismatches output-to:"D:\Reports\Exe\Audit3.html" output-options:html-color
However I believe that is not an option in v3 (or v4 from a quick check).
I keep coming back to the "load ignore-unimportant-session" line. Am I in the right area?
Or could it be the different UAC on the newer OS?
Any ideas where or what I've missed in the move?
Fingers crossed it is something simple.
Hopefully this isn't a duplicate (I looked but couldn't see anything which I've not already tried/experimented with).
Thanks.
Rob.
Running BeyondCompare version 3.3.13 build 18981.
The Setup
I have a windows scheduled event set up to trigger X actions and shift files around before comparing them and emailing the results out. I put it together on a Server 2003 machine and it has been happy chugging along for several years, but the machine needs to be retired so I'm moving it to a new machine (Server 2012R2).
In the old system it would run a bat file and call the following:
"D:\Program Files\Beyond Compare 3\BCompare.exe" @"D:\Reports\Exe\BeyondCompare.txt"
In the BeyondCompare.txt it contained the following:
load ignore-unimportant-session
criteria rules-based
load "D:\Reports\Master Copy" "D:\Reports\Latest"
expand all
select all.diff.files
text-report layout:side-by-side &
options:ignore-unimportant,display-mismatches &
output-to:"D:\Reports\Exe\Audit2.html" output-options:html-color
folder-report layout:summary &
options:display-mismatches output-to:"D:\Reports\Exe\Audit3.html" output-options:html-color
In the new machine (Server 2012R2 and now attempting to use Powershell) it was called using:
& "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "@`"D:\Reports\Exe\BeyondCompare.txt`"" | Write-output
#(The Write-output was used to make it wait until it was done before proceeding to send out the email etc.)
In the BeyondCompare.txt it contained exactly the as noted above (with the same folders/layout and share permissions as far as I can see).
The results/problem
If I manually run it, the completes without issue.
If I schedule it and remain signed in when it triggers it finishes without issue.
If I leave the schedule to run while I'm not signed in then it fails.
After turning on logging (log normal "D:\Reports\BeyondCompareLogging.txt") I saw the following (ditto with verbose):
27/04/2017 3:08:32 p.m. >> #Turn logging on.
27/04/2017 3:08:32 p.m. >> log normal "D:\Reports\BeyondCompareLogging.txt"
27/04/2017 3:08:32 p.m. >> load ignore-unimportant-session
27/04/2017 3:08:32 p.m. Load comparison: <->
27/04/2017 3:08:32 p.m. Fatal Scripting Error: Unable to load base folder
27/04/2017 3:08:32 p.m. Script completed in 0.05 seconds
However when I run it manually it completes without issue, and the same set-up (as far as I can tell) is still running/completing without issue on the old Server 2003 machine.
If I comment out the #load ignore-unimportant-session line it completes, but the email is now huge (as there are quite a few rules about what can be ignored - though this has been set as default so could this be improved somehow on my part?)
Things I've tried/checked:
I tried altering "criteria rules-based" to include the "ignore-unimportant" e.g. criteria rules-based ignore-unimportant but I suspect this is an improvement that is only present/available for v4 as it seems to be disliked by v3.
The scheduled event on both machines is the same and running as myself with my credentials and set to run even if no one is signed in. It has also been set to run with the highest privileges and the action written as PowerShell.exe -File "D:\Reports\Copy to Reports.ps1".
I altered everything to use UNC pathing and shared relevant root parent folders etc.
Tried calling it using more pure Powershell (after getting help from others):
Write-Output "Running BeyondCompare"
$process="${Env:ProgramFiles(x86)}\Beyond Compare 3\BCompare.exe"
$args="@`"$targetDirectory\Exe\BeyondCompare.txt`" "
Write-Output $process $args
Start-Process $process -ArgumentList $args -Wait
Write-Output "BeyondCompare has finished"
I tried incorporating the ignore-unimportant option into:
folder-report layout:summary &
options:display-mismatches output-to:"D:\Reports\Exe\Audit3.html" output-options:html-color
However I believe that is not an option in v3 (or v4 from a quick check).
I keep coming back to the "load ignore-unimportant-session" line. Am I in the right area?
Or could it be the different UAC on the newer OS?
Any ideas where or what I've missed in the move?
Fingers crossed it is something simple.
Hopefully this isn't a duplicate (I looked but couldn't see anything which I've not already tried/experimented with).
Thanks.
Rob.
Comment