![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-26 21:06 |
47,815 topics / 349,928 posts / today 0 new / 48,288 members |
| DOS启动盘 & LOGO技术 (启动盘室) » What is ERRORLEVEL in wbat? |
| Printable Version 1,288 / 3 |
| Floor1 sunz007 | Posted 2006-04-21 21:05 |
| 初级用户 Posts 25 Credits 180 | |
|
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! |
|
| Floor2 Wengier | Posted 2006-04-23 00:01 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Try changing if errorlevel 0 goto end to if not errorlevel 1 goto end.
|
|
| Floor3 21yefeng | Posted 2007-05-10 18:07 |
| 初级用户 Posts 15 Credits 29 | |
|
This just solved one of my problems. Thank you very much!
|
|
| Floor4 minchengan | Posted 2007-06-17 23:47 |
| 中级用户 Posts 164 Credits 376 | |
|
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? |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |