![]() |
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 06:18 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Moderator, how do I use the software “err2env”? |
| Printable Version 1,307 / 8 |
| Floor1 walu | Posted 2004-02-04 00:00 |
| 高级用户 Posts 201 Credits 916 | |
|
Under DOS I want to get the return code after running a certain file such as GHOST. How do I use err2env?
For example, if I use COMMAND /Z and then run GHOST, it returns code 0. |
|
| Floor2 Kinglion | Posted 2004-02-04 00:00 |
| 铂金会员 Posts 1,924 Credits 5,798 From 金獅電腦軟體工作室 | |
|
Actually you can use a BAT file to do it. Below is a batch file I wrote. This file is used to display the exit code after a program runs. Please take a look:
@echo off REM Write the name of the program you want to run here for %%a in (0;1;2;3;4;5;6;7;8;9) do if errorlevel %%a set testerr=%%a echo. echo Current errorlevel is : %testerr% echo. set testerr= If there is anything inappropriate, please point it out! |
|
| Floor3 xiaojun | Posted 2004-02-04 00:00 |
| 银牌会员 Posts 499 Credits 2,202 | |
|
By the way, I have a question I don't understand: since REM just adds comments to the program and does not run, wouldn't it be fine simply not to write that line? What's the difference between adding it and not adding it? Thanks...!
|
|
| Floor4 Wengier | Posted 2004-02-05 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Comments are just to make it clearer for yourself and everyone else. For example, if you want to modify the source code sometimes, this makes it more direct and easier.
|
|
| Floor5 walu | Posted 2004-02-05 00:00 |
| 高级用户 Posts 201 Credits 916 | |
|
Moderator, what I want to ask about is the specific usage of the software err2env. I can't understand the English instructions. Could you give some specific guidance?
|
|
| Floor6 Kinglion | Posted 2004-02-05 00:00 |
| 铂金会员 Posts 1,924 Credits 5,798 From 金獅電腦軟體工作室 | |
|
Could you upload the software ERR2ENV? That would also let everyone see the prompt messages.
|
|
| Floor7 Wengier | Posted 2004-02-05 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
Kinglion: there is an ERR2ENV download in the site's “script tools” section:
http://newdos.yginfo.net/doswaren.htm |
|
| Floor8 walu | Posted 2004-02-14 00:00 |
| 高级用户 Posts 201 Credits 916 | |
|
Moderator, can the software “err2env” be used in PC-DOS7.1? How exactly do you use it?
|
|
| Floor9 Kinglion | Posted 2004-02-14 00:00 |
| 铂金会员 Posts 1,924 Credits 5,798 From 金獅電腦軟體工作室 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |