I do not know whether GfW provides "something" which you could "query"
to find the location of bash.exe, but possibly you could roll like this:
* The location of bash.exe may be expected to be reasonably stable
between GfW releases.
* It is supposedly also stable relative to the location of git.exe.
* Since git.exe is in the path, you could first locate its full pathname -
say, calling
where git.exe
if writing a batch (for cmd.exe), or something analogous in other
environments.
* Use other tools for path manipulation to construct the pathname
of bash.exe.