When looking for gpgconf.exe, the fallback introduced in commit 72b83ff does not
work.
I have looked at find_program_at_standard_place() in w32-util.c, and
the code logic seems incorrect. The "path" buffer is always set to
contain path of the 64-bit Program Files, since the first call to
SHGetSpecialFolderPathA() will always succeed. The second call is never
used.
The correct way would be to make the first call, try access() on the
path constructed in "result", and if it fails, try the same thing with
CSIDL_PROGRAM_FILESX86.
Attached patch fixes the issue. With it, I am able to use GpgME in a
64-bit app.