GnuCash on Windows puts its settings folders in the wrong place.
The fix is to add the line
HOME={APPDATA}/GnuCash
at the end of the file
%ProgramFiles%\GnuCash\etc\gnucash\environment
Here’s the bug report: https://bugzilla.gnome.org/show_bug.cgi?id=503722
Edit: It appears you need to create the %AppData%\GnuCash directory first.