Errorlevel Paradigm Behaves Differently in Windows NT 3.51Last reviewed: March 15, 1996Article ID: Q137857 |
The information in this article applies to:
SYMPTOMSThe value returned to the operating system by a 16-bit application when it closes is called an error level. The values that Windows NT 3.51 returns is different than those returned by OS/2 1.3 and Windows NT 3.5. For example, create a TEST.CMD file with the following text:
@echo off return 3 if errorlevel 3 set x=3 if errorlevel 2 set x=2 if errorlevel 1 set x=1 echo Return is: %X% return 3 if errorlevel 1 set x=1 if errorlevel 2 set x=2 if errorlevel 3 set x=3 echo Return is: %X%NOTE: RETURN.EXE is just a simple program which performs exit(atoi(argv[1])). If you run TEST.CMD in OS/2 1.3 and Windows NT 3.5, the following results appear:
Return is: 3 Return is: 1If you run TEST.CMD in Windows NT 3.51, the following results appear:
Return is: 1 Return is: 3 RESOLUTIONThis problem has been corrected in the latest Service Pack for Windows NT version 3.51.
STATUSMicrosoft has confirmed this to be a problem in Windows NT version 3.51. This problem was corrected in the latest Windows NT 3.51 U.S. Service Pack. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base (without the spaces):
S E R V P A C K |
KBCategory: kbother kbbug3.51 kbfix3.51.sp4
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |