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-17 12:20
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Help: The batch file automatically closes the window after execution View 1,569 Replies 3
Original Poster Posted 2005-08-12 19:01 ·  中国 陕西 西安 电信
新手上路
Credits 5
Posts 2
Joined 2005-08-12 18:59
21-year member
UID 41595
Gender Male
Status Offline
RT
I searched a lot but didn't succeed. I don't know which command it is, I'm on Xp.
Floor 2 Posted 2005-08-12 20:10 ·  中国 山西 大同 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re liu999:

Under normal conditions of XP, after a batch processing is executed, its window will automatically close; unless a PAUSE command or similar pause program is inserted in the executed batch processing, or there may also be special settings in the system.

If PAUSE or similar programs are not found in the batch processing, you can try the following method: change the extension of the batch processing from.bat to.com, right-click the modified program, delete the.com extension in "Properties - Program - Command Line", then confirm and check "Close on exit" below, then click OK, then change the.com extension back to.bat, and finally execute the newly generated DOS shortcut to test the running result.
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 3 Posted 2005-08-12 22:26 ·  中国 河北 沧州 联通
初级用户
Credits 55
Posts 23
Joined 2005-08-11 15:25
21-year member
UID 41558
Status Offline
Can I add the exit command after the program? I wonder if it can work in XP.
Floor 4 Posted 2005-08-13 11:56 ·  中国 陕西 西安 电信
新手上路
Credits 5
Posts 2
Joined 2005-08-12 18:59
21-year member
UID 41595
Gender Male
Status Offline
Reply to the moderator, today when I powered on and re-read, it actually got better after the test. I'm puzzled, thanks!
Forum Jump: