View Single Post
Old 03-25-2021, 02:28 PM   #1
JWGreenley
Junior Member
JWGreenley began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2020
Location: South Carolina
Device: Android Moto G Power, Kindle, iPad, Windows PC
When Calibre fails from a command line, it doesn't complain or set the RC

When Calibre is started or stopped from the command line, if it has an error,, it just doesn't complain or set an error / return code. In the example below, I'm using a known issue stemming from Windows 10's security "enhancements" where the calibre --s command doesn't work from a users command window, IF Calibre was started via the Task Scheduler.

C:\WINDOWS\system32>"D:\Program Files\Util\pslist64.exe" calibre -nobanner
Process information for HP-PRIME:

Name Pid Pri Thd Hnd Priv CPU Time Elapsed Time
calibre 17768 6 21 712 254852 0:00:35.515 8:20:31.698
calibre-parallel 29200 8 1 163 10084 0:00:00.140 8:17:01.612

C:\WINDOWS\system32>calibre --s

C:\WINDOWS\system32>echo %errorlevel%
0

C:\WINDOWS\system32>"D:\Program Files\Util\pslist64.exe" calibre -nobanner
Process information for HP-PRIME:

Name Pid Pri Thd Hnd Priv CPU Time Elapsed Time
calibre 17768 6 21 712 254852 0:00:35.578 8:21:10.877
calibre-parallel 29200 8 1 163 10084 0:00:00.140 8:17:40.791


No complaint, and the return code is set to zero.
I've noticed similar behavior if I start Calibre and it encounters an error. Again, it just dies without a whimper.

My concern is not the failure. I just used it as an example. I just would like some way to verify that the command was properly executed or encountered an error.

Thanks!
JWGreenley is offline   Reply With Quote