If you are stuck at running Apache Pig on windows due to an error like
hadoop-2.4.0\bin\hadoop-config.cmd' is not recognized as an internal or external command,
operable program or batch file.
though you are having Hadoop running perfectly on windows
解决方案
Answer, which was originally added by the asker inside the quesiton.
These steps may help you.
Troubleshooting steps
open the file pig.cmd in any editor like notpad / notepad++
look for the line set HADOOP_BIN_PATH=%HADOOP_HOME%\bin
replace this with set HADOOP_BIN_PATH=%HADOOP_HOME%\libexec
What we did was that hadoop-config.cmd file was not being found by pig so we pointed it with the correct one. You may first find where the hadoop-config.cmd file is and replace it with appropriate path. This was what my hadoop-2.4.0 was having.