My understanding is that the "which solution" will not work on Windows, while https://gist.github.com/bantu/adada7fe658131bc3b76 will also work in Windows, but not if PowerShell is the default shell (not sure whether that is possible). Just calling the executable should work on even more systems.