I have the same issue as this user: ant - not recognized as an internal
however unfortunately none of the solutions have worked for me in that post or any other. I\
When Environment variables are changed log off and log in again so that it will be applied.