China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-23 15:04
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » What is ERRORLEVEL in wbat? View 1,185 Replies 3
Original Poster Posted 2006-04-21 21:05 ·  中国 浙江 绍兴 电信
初级用户
Credits 180
Posts 25
Joined 2003-05-08 00:00
23-year member
UID 1939
Gender Male
Status Offline
I'm using WBAT for batch processing. One of the options is "0, Exit", but when I use
"if errorlevel 0 goto end" it just won't jump to ":END". If I change it to some other number, it will jump. I don't know why. Please advise, experts. Thanks!
Floor 2 Posted 2006-04-23 00:01 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Try changing if errorlevel 0 goto end to if not errorlevel 1 goto end.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2007-05-10 18:07 ·  中国 辽宁 沈阳 电信
初级用户
Credits 29
Posts 15
Joined 2007-02-03 15:28
19-year member
UID 78537
Gender Male
Status Offline
This just solved one of my problems. Thank you very much!
Floor 4 Posted 2007-06-17 23:47 ·  中国 湖北 黄冈 电信
中级用户
★★
Credits 376
Posts 164
Joined 2006-12-05 01:28
19-year member
UID 72582
Gender Male
Status Offline
In Mini WIN32, when exiting at the end there is an option:
%drive%\boot\boot\win32\wbat box "Save the system settings to the disk?",Yes,No #1,5
if errorlevel 2 if not errorlevel 3 %drive%\boot\boot\win32\win.bat _quit_
goto continue
Question: if I want the default to be not save, how should I change that ERRORLEVEL line?
Forum Jump: