You need to add the PHP directory to your path
Solution 1 : Needs a batch file
1
2
3
4
5
6
//http://stackoverflow.com/a/2736574
SET PATH=%PATH%;C:\xampp\php
.
.
.your command here
Solution 2 : Permanent
Go to your “system properties” please.then follow as bellow.
Advanced system settings(from left sidebar)->Environment variables(very last option)->path(from lower box/system variables called as I know)->edit
then concatenate the “php” location you have in your pc (usually it is where your xampp is installed say c:/xampp/php)
origin - http://www.pipiscrew.com/?p=6578 add-php-dir-to-windows-path