M-x ansi-term error

Lubos Pintes <[email protected]> Tue, 4 Apr 2017 12:18:09 +0200
Newsgroups gmane.emacs.windows
Message-ID <[email protected]>
Hello,
I am trying to run a MSYS2 shell, bash.exe, under Emacs version 25.1. It 
offers me the path:
c:/msys64/usr/bin/bash.exe
This is correct path, the bash.exe is there. But after I press a RET an 
error
Spawning child process: Invalid argument
This error also appears when I try to run the default program offered by 
Emacs:
C:/c/emacs/libexec/emacs/25.1/i686-w64-mingw32/cmdproxy.exe