我编写的批处理文件不会自动关闭或退出时关闭
我在启动蠕虫之前制作了这个批处理文件来关闭资源管理器,因为由于某种原因,如果我不这样做,我的颜色就会变得混乱。 批处理文件工作正常,只是完成后它不会关闭。 我做错了什么?
@echo off
echo Closing explorer and launching worms
taskkill /F /IM explorer.exe
"C:\Games\Worms Armageddon - New Edition\wa"
echo Hit any key to resume explorer!
pause
"C:\windows\explorer"
exit
我尝试使用 start 来调用程序,当我使用
start "C:\windows\explorer"
它时,只会打开一个新的命令窗口,标题栏显示 explorer.exe,但我的任务栏和所有内容仍然消失。
I made this batch file to close explorer before launching Worms because for some reason my colors get messed up if I don't. The batch file works fine except that it doesn't close when it's finished. What did I do wrong?
@echo off
echo Closing explorer and launching worms
taskkill /F /IM explorer.exe
"C:\Games\Worms Armageddon - New Edition\wa"
echo Hit any key to resume explorer!
pause
"C:\windows\explorer"
exit
I've tried using start to call the programs and when I use
start "C:\windows\explorer"
it just opens a new command window and the titlebar says explorer.exe but my taskbar and everything is still gone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
START
很挑剔。 根据帮助:正如您在此处看到的,第一个参数可以是标题。 似乎引号在这里具有某种含义,可以作为标题,但并非总是如此。
无论如何,请尝试以下操作:
注意,您可以通过指定 explorer.exe 的完整路径来避免这种情况,如下所示:(
注意缺少的引号,将引号放回去,它又是一个标题)。
正如我所说,挑剔。
START
is finicky. As per the help:As you can see here, the first argument could be a title. It seems that the quotes have a meaning here that could be a title, but not always.
Anyway, instead, try this:
Note, you can avoid this by specifying the full path to explorer.exe, like this:
(note the missing quotes, put the quotes back, and it's a title again).
As I said, finicky.