![]() |
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-14 00:33 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » [Help] Questions about return codes and parameters in batch files. |
| Printable Version 1,077 / 0 |
| Floor1 seifer1754 | Posted 2006-04-14 15:23 |
| 初级用户 Posts 9 Credits 26 | |
|
I’ve read a lot of batch file tutorials, but the explanations of return codes and parameters in batch files are never very detailed.
But if you want to make a fairly complete batch file, these two areas need to be used a lot. For example, I want to use a CD to do automatic Ghost system recovery. I hope it can boot from the CD automatically and use the image file on the CD to overwrite drive C:. The autoexec.bat file looks like this MSCDEX.EXE /D:IDECE001 /L:Z Ghost -clone,mode=load,src=z:\bac.gho,dst=1:1 -sure -rb Now I want there to be a prompt after booting from the CD: if needed, press "1"; if not, press "2" to exit. So I need a return code for the judgment. How should autoexec.bat on the CD be set up? And a lot of batch files use parameters, but there have never been very detailed tutorials on how parameters are used. For example, the batch file below, echo. message /b 15 1 %msg% echo *** %msg% ***>> c:\diag\proc.log getrtime >> c:\diag\proc.log How is %msg% used here? Could an expert give me some pointers? I hope an expert can give a simple explanation of these two aspects. I would be extremely grateful. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |