![]() |
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-08-13 01:16 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Question: How are the return codes for IF ERRORLEVEL defined? |
| Printable Version 593 / 0 |
| Floor1 haibing | Posted 2003-12-01 00:00 |
| 初级用户 Posts 2 Credits 116 | |
|
Question: if I execute a command, how is the error return code after IF ERRORLEVEL defined??
For example: after GHOST fails to restore my system, I want it to display an error message, and after a successful restore, display a success message. How should I set it up?? :RESTORE CHOICE /C:YN /T:N,10 CAUTION:All data on disk C will be lost,are you sure IF ERRORLEVEL 2 GOTO QUIT LH SMARTDRV.EXE 4096 @echo Please waiting.... GHOST -clone,mode=pload,src=F:\WIN98BAK.GHO:1,dst=1:1 -sure IF ERRORLEVEL ? ECHO Restore system failure! GOTO QUIT @echo Your system is restored successfully. @echo Please remove the floppy diskette and reboot your computer! GOTO QUIT |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |