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-06-26 12:53
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Help] Problem running batch files under Win98! (Moderator, save me) View 799 Replies 6
Original Poster Posted 2003-08-12 00:00 ·  中国 四川 巴中 移动
初级用户
Credits 103
Posts 1
Joined 2003-08-12 00:00
22-year member
UID 8456
Gender Male
Status Offline
My computer's operating system is Win98 Second Edition. When I run a batch file, after it finishes, the system will not automatically close the run window (there is an exit command line, I wouldn't forget even that!). Question for all the experts: is there any way to solve this problem?


暮春三月,羊欢草长。天寒地冻,问谁饲狼。人皆怜羊,狼独悲怆。天心难测,世情如霜。
Floor 2 Posted 2003-08-12 00:00 ·  中国 香港
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
Set the batch file's properties.
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 3 Posted 2003-08-13 00:00 ·  中国 黑龙江 哈尔滨 联通
初级用户
Credits 188
Posts 25
Joined 2003-08-13 00:00
22-year member
UID 8532
Gender Male
Status Offline
Add cls at the end of the batch file.
————————————
做一颗永不生锈的螺丝帽!
————————————
Floor 4 Posted 2003-08-13 00:00 ·  中国 广东 广州 白云区 电信
初级用户
Credits 163
Posts 17
Joined 2003-08-13 00:00
22-year member
UID 8500
Gender Male
Status Offline
The following is quoted from whatsmore's post on 2003-8-13 18:16:16:
Add cls at the end of the batch file.

How could adding cls possibly work? Isn't cls the command to clear the screen?
I thought maybe my line of thinking was wrong, but I tried it and it didn't work.
Floor 5 Posted 2003-08-14 00:00 ·  中国 黑龙江 哈尔滨 联通
初级用户
Credits 188
Posts 25
Joined 2003-08-13 00:00
22-year member
UID 8532
Gender Male
Status Offline
It works here for me.
What that means is, if after the batch file finishes the screen is blank, the system thinks you didn't write anything to the screen, so it can close automatically. If after it finishes the screen isn't blank, the system leaves the finished screen there for you to look at. Oh right, you also have to delete that .pif.
If what you want is to type xxx.bat at the command prompt and have it close that window too after it finishes, then I don't know.
————————————
做一颗永不生锈的螺丝帽!
————————————
Floor 6 Posted 2003-08-16 00:00 ·  中国 福建 宁德 电信
初级用户
Credits 263
Posts 35
Joined 2003-08-10 00:00
22-year member
UID 8334
Gender Male
Status Offline
Create a shortcut for your bat file, that is, a .pif file. Right-click that shortcut, choose Properties -- Program, and check Close on exit. That will solve your problem.
Floor 7 Posted 2003-08-20 00:00 ·  中国 山东 济南 联通
初级用户
Credits 150
Posts 10
Joined 2003-08-20 00:00
22-year member
UID 8931
Gender Female
Status Offline
Add "end" at the end.
Forum Jump: