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-08-13 02:47
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » [About batch file echo messages and popping-up DOS dialog boxes!?] View 1,226 Replies 6
Original Poster Posted 2003-08-19 00:00 ·  中国 浙江 湖州 电信
初级用户
Credits 167
Posts 14
Joined 2003-08-02 00:00
23-year member
UID 7965
Gender Male
Status Offline
Two questions:
How can I prevent the DOS dialog box from popping up when running a batch file?

@echo off can only hide the commands themselves, but it can't hide the echoed output messages. How can I stop it from echoing them?
Floor 2 Posted 2003-08-19 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
23-year member
UID 7391
Gender Male
From 福建省
Status Offline
@echo off can hide the prompt messages. As for some returned messages, you can check whether the command has a /Y parameter for making the default choice.
Some commands require human-computer interaction, so there's no way around that.
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 3 Posted 2003-08-20 00:00 ·  中国 浙江 湖州 电信
初级用户
Credits 167
Posts 14
Joined 2003-08-02 00:00
23-year member
UID 7965
Gender Male
Status Offline
@echo off can only hide the commands themselves, but it can't hide the echoed output messages. How can I stop it from echoing them?

I've already solved this problem. Someone reminded me of the printer network test null port, and that can be used for this........

But the second problem still hasn't been solved?
How can I prevent this: when running a batch file, a DOS dialog box pops up?
Floor 4 Posted 2003-08-20 00:00 ·  中国 湖北 武汉 联通
银牌会员
★★★
Credits 1,681
Posts 512
Joined 2003-08-02 00:00
23-year member
UID 7953
Gender Male
Status Offline
A DOS dialog box? You mean WBAT, right... Just put "::" in front of WBATE and that'll do it. REM works too.
Somehow somewhere I've got to choose.
No matter if it is win or lose.
Floor 5 Posted 2003-08-21 00:00 ·  中国 浙江 湖州 电信
初级用户
Credits 167
Posts 14
Joined 2003-08-02 00:00
23-year member
UID 7965
Gender Male
Status Offline
Oh! Correction of wording: it's when the net command under Windows 2000 Server OS runs a batch file through cmd.exe!




Floor 6 Posted 2003-08-21 00:00 ·  中国 山东 青岛 联通
初级用户
Credits 132
Posts 7
Joined 2003-01-29 00:00
23-year member
UID 816
Gender Male
Status Offline
Floor 7 Posted 2003-08-21 00:00 ·  中国 浙江 湖州 电信
初级用户
Credits 167
Posts 14
Joined 2003-08-02 00:00
23-year member
UID 7965
Gender Male
Status Offline
The following is quoted from hwlon's post at 2003-8-21 11:16:01:
>NUL


You'll understand after looking at this picture. Adding >nul is also useless! If you don't believe it, try it yourself, the dialog box will still pop up!
http://photo.online.tj.cn/upload_pic0723/2738/97385721667323788307521.gif
Forum Jump: