I had a similar issue and mine turned out to be the timeout setting with was at the default 5. I wasnt allocating enough time for the check to complete. Thus a false return.
Roderick Garcia | Senior Systems Support Engineer American Cancer Society, Inc. 8400 Silver Crossing Oklahoma City, OK 73132 cancer.org (http://www.cancer.org) | 1.800.227.2345 (http://www.facebook.com/americancancersociety?societysignature=facebook) (http://www.twitter.com/americancancer?societysignature=twitter) (http://www.youtube.com/user/AmerCancerSociety?societysignature=youtube) (http://www.linkedin.com/company/american-cancer-society?societysignature=linkedin) (http://www.cancer.org/) (http://charityreports.bbb.org/public/seal.aspx?ID=1413312005) This message (including any attachments) is intended exclusively for the individual to whom it is addressed and may contain proprietary, protected, or confidential information. If you are not the named addressee, you are not authorized to read, print, copy, or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately. From: Servers Alive Discussion List [mailto:salive@woodstone.nu] On Behalf Of Jason Passow Sent: Wednesday, December 09, 2015 9:50 AM To: Servers Alive Discussion List Subject: [SA-list] ErrorLevel AGAIN I have a check which always returns error level 0. It should not and from a command line it indeed does not. Using the Checkerrorlevel that comes with salive it does indeed show 0. Output .txt contains 2 for /F "delims=" %%a in (output.txt) do ( set "SHELL_EXIT_CODE=%%a" ) exit %SHELL_EXIT_CODE% Command line results: C:\Program Files (x86)\CountError\>CountError.bat C:\Program Files (x86)\CountError\>echo %errorlevel% 2 Jason Passow Network Administrator http://www.mwsco.com jas...@mwsco.com ph: (507) 494-5178 fax: (507) 454-8104 Mississippi Welder Supply Co., Inc. Please consider the environment before printing this email. ____________________________________________________________________________________________________________________________________________________________________________________________________________________________ The information contained in this message is privileged and intended only for the recipients named. If the reader is not a representative of the intended recipient, any review, dissemination or copying of this message or the information it contains is prohibited. If you have received this message in error, please immediately notify the sender, and delete the original message and attachments. To unsubscribe send a message with UNSUBSCRIBE in the subject line to salive@woodstone.nu If you use auto-responders (like out-of-the-office messages), make sure that they are not sent to the list nor to individual members. Doing so will cause you to be automatically removed from the list. To unsubscribe send a message with UNSUBSCRIBE in the subject line to salive@woodstone.nu If you use auto-responders (like out-of-the-office messages), make sure that they are not sent to the list nor to individual members. Doing so will cause you to be automatically removed from the list.