Hi,

I have faced this type of issue before and I solved it by using .BAT file instead of .CMD file. What I got at that time is that .CMD does not support ERRORLEVEL property correctly.

See this link http://en.wikipedia.org/wiki/Batch_file

May this help.

Thanks and Regards,
Danish