[GNC] 5.11 gnucash-cli.exe This app can't run on your PC

Chris Good goodchris96 at gmail.com
Fri May 23 04:42:34 EDT 2025


-----Original Message-----
From: John Ralls <jralls at ceridwen.us> 
Sent: Friday, 23 May 2025 3:03 AM
To: Chris Good <goodchris96 at gmail.com>
Cc: gnucash-user at gnucash.org
Subject: Re: [GNC] 5.11 gnucash-cli.exe This app can't run on your PC


> On May 22, 2025, at 01:51, Chris Good <goodchris96 at gmail.com> wrote:
> Hi All,
> 
> FYI
> 
> Windows 11 Home 24H2 OS build 26100.4061
> GnuCash 5.9
> 
> I had a problem with GnuCash 5.9 (Finance::Quote 1.57) hanging a few 
> days ago getting market prices from source asx.
> 
> I think the ASX now must have been down that Sunday.
> I was trying to use gnucash-cli.exe to test the next day and it kept 
> on failing
> e.g.
> In a command prompt with current directory C:\Program Files 
> (x86)\gnucash\bin>
> gnucash-cli.exe -V --quotes dump asx CBA
>  CBA Finance::Quote returned no data and set no error.
> 
> However GnuCash WAS able to get quotes (Monday).
> Also
> C:\Strawberry\cpan\build\Finance-Quote-1.57-0\Examples\stockdump.pl 
> asx CBA
> worked, so the problem seemed to be gnucash-cli.exe.
> 
> I updated to GnuCash 5.11,
> and the first time I ran the above gnucash-cli.exe command, it worked 
> (so I assume there must have been a problem with GnuCash-cli.exe 5.9.
> 
> However the next time, it got a dialog box saying
>  This app can't run on your PC
>  To find a version for your PC, check with the software publisher.
> 
> and cmd window shows: Access is denied.
> 
> File Explorer now shows gnucash-cli.exe size = 0.
> 
> I reinstalled GnuCash 5.11 and set the properties for gnucash-cli.exe 
> to run in Windows 8 Compatibility mode.
> I.e.
> 
> In File Explorer, navigate to C:\ Program Files (x86)\gnucash\bin
> 
>  Right click on gnucash-cli.exe, Properties, Compatibility tab, select 
> "Windows 8"
>    under "Run this program in compatability mode for:")
> 
> And it now seems to be working fine multiple times.
> 
> Can a developer please advise if I should raise a bug?
> This error does not seem to affect gnucash.exe itself.
> 
> 
> 
> Thank very much all who contribute to GnuCash!

Chris,

Something happened that caused gnucash-cli.exe’s directory entry to get pointed at an empty node. I can’t think of a way for GnuCash to do that to itself. 

 Windows 8 compatibility mode is unlikely to affect GnuCash: It’s for programs built for earlier than Win8 (ie. XP, Vista, and Win7) to run on Win8. GnuCash is presently built on Win10 and has almost no calls directly to Windows  API;  those are done through intermediate frameworks like Gtk and MinGW64, both of which are actively maintained to current Windows standards. Most of the incompatibilities that compatibility mode shims out have to do with graphics and that’s obviously not relevant to gnucash-cli.

Regards,
John Ralls

Hi John,

As usual you are correct. I remember now I accidentally pasted into my cmd window:
C:\Program Files (x86)\gnucash\bin>gnucash-cli.exe -V --quotes dump asx CBA
 
Of course the "Greater Than" sign above caused the output of command 
" C:\Program Files (x86)\gnucash\bin" (no output)
to override gnucash-cli.exe.
Who's idea was it to include a greater than sign in PROMPT by default!!!!

There is NO need to set gnucash-cli.exe to have Windows 8 compatibility.

I have now changed my cmd window PROMPT to remove the greater than sign so this doesn't happen again.
It is now Drive and Path ($P) and a space ($S).

If anyone is interested in how to change the prompt (in both cmd and PowerShell), please see
https://www.hanselman.com/blog/a-better-prompt-for-cmdexe-or-cool-prompt-environment-variables-and-a-nice-transparent-ultiprompt

Thanks and Regards,
Chris Good




More information about the gnucash-user mailing list