|
024024
初级用户
 
积分 60
发帖 14
注册 2006-3-23
状态 离线
|
『楼 主』:
要BAT文件的窗口会自动关闭.
使用 LLM 解释/回答一下
比如说:
我们在BAT语句中,只有这样一句:
NOTEPAD AA.TXT
运行后BAT窗口不会消失,直到你把notepad关闭了,这BAT窗口才会关闭.
我想做的是怎样才能做到一打开NOTEPAD,
BAT文件的窗口就会自动关闭.
我试过用CALL或者START来调用NOTEPAD.EXE都不行.
For example:
In the BAT statement, we only have such a sentence:
NOTEPAD AA.TXT
After running, the BAT window will not disappear until you close the notepad, and then the BAT window will close.
What I want to do is how to make the BAT file window automatically close as soon as NOTEPAD is opened.
I have tried using CALL or START to call NOTEPAD.EXE, but it doesn't work.
|
|
2006-3-24 11:15 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
用start可以啊,在2003下试验成功,内容如下:
@echo off
start notepad.exe
It's okay to use start. It was tested successfully under 2003. The content is as follows:
@echo off
start notepad.exe
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2006-3-24 12:36 |
|
|
bagpipe
银牌会员
     DOS联盟捡破烂的
积分 1144
发帖 425
注册 2005-10-20 来自 北京
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
石头兄好像差了个参数???START /WAIT 程序 ,不知道2003用不用这个/WAIT,2000系统还是需要的。LZ可以试验一下
Brother Shitou seems to be missing a parameter??? START /WAIT program. I don't know if /WAIT is needed in 2003, but it's still needed in the 2000 system. LZ can test it
|
|
2006-3-24 13:31 |
|
|
024024
初级用户
 
积分 60
发帖 14
注册 2006-3-23
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
Originally posted by bagpipe at 2006-3-24 13:31:
石头兄好像差了个参数???START /WAIT 程序 ,不知道2003用不用这个/WAIT,2000系统还是需要的。LZ可以试验一下
我在XP+SP2下试了,不要 /WAIT.
THANK YOU TWO
Originally posted by bagpipe at 2006-3-24 13:31:
Brother Shi Tou seems to be missing a parameter??? START /WAIT program, I don't know if /WAIT is needed in 2003, it's still needed in 2000 system. LZ can test it
I tried it under XP + SP2, no need for /WAIT.
THANK YOU TWO
|
|
2006-3-24 14:14 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
嘿嘿,如果加上/wait,那么就真的不能关闭cmd窗口了。
Heheh, if you add /wait, then you really can't close the cmd window.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2006-3-24 17:15 |
|
|
bagpipe
银牌会员
     DOS联盟捡破烂的
积分 1144
发帖 425
注册 2005-10-20 来自 北京
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Originally posted by Climbing at 2006-3-24 17:15:
嘿嘿,如果加上/wait,那么就真的不能关闭cmd窗口了。
我想楼主的意思我没有理解错,我说的情况是WIN 2000系统下,楼主的意思是:“我们在BAT语句中,只有这样一句:
NOTEPAD AA.TXT
运行后BAT窗口不会消失,直到你把notepad关闭了,这BAT窗口才会关闭” 我不知道楼主是运行完BAT就关闭CMD还是运行后保持CMD窗口然后结束程序后在关闭CMD窗口,不明白.............................LZ什么意思!!!唉
Originally posted by Climbing at 2006-3-24 17:15:
Hey, if you add /wait, then the cmd window really can't be closed.
I think I didn't misinterpret the LZ's meaning. The situation I mentioned is under the WIN 2000 system. The LZ's meaning is: "In the BAT statement, we only have such a sentence:
NOTEPAD AA.TXT
After running, the BAT window won't disappear until you close the notepad, and then the BAT window will close." I don't know whether the LZ runs the BAT and then closes the CMD or keeps the CMD window after running and then closes the CMD after ending the program. I don't understand.............................What does the LZ mean!!! Alas
|
|
2006-3-25 09:19 |
|
|
lymygee
新手上路

积分 5
发帖 3
注册 2006-4-16
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
我也遇到这个情况了,加了个START 就好了,谢谢了
I also encountered this situation. Adding a START solved it. Thanks.
|
|
2006-4-17 17:48 |
|