The problem is that when the %reply%
variable is substituted with its value, cmd tries to interpret this:
IF NOT Who is there? == "Who is there?" (
Rather than this:
IF NOT "Who is there?" == "Who is there?" (
To fix it, add quotes around %reply%
, like this:
IF NOT "%reply%" == "Who is there?" (
ECHO "Sorry, but you are not playing the game right!"
GOTO :EOF)