如何使用批处理文件时关闭cmd窗口? [英] How to close cmd window when using a batch file?
本文介绍了如何使用批处理文件时关闭cmd窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
新建批处理文件,第一次真正尝试。试图使一个简单的批处理文件,将打开notpad ++的新实例。该批处理文件工作和新notpad ++窗口打开,但cmd窗口也保持打开为好。如何关闭cmd窗口记事本的新实例已lauched后批处理文件中?
@ECHO OFFCALL CD C:\\ Program Files文件(x86)的\\记事本++ \\CALL记事本++。exe文件-multiInst
解决方案
您可以使用启动
:
启动记事本++
和应该没有必要使用一个明确的退出
从批处理(这是可以通过转到做:EOF
或退出/ b
)为启动
调用立即返回。
New to batch files, first try actually. Trying to make a simple batch file that will open a new instance of notpad++. The batch file works and a new notpad++ window is opened, but the cmd window also stays open as well. How do I close the cmd window within the batch file after the new instance of notepad has been lauched?
@ECHO OFF
CALL cd C:\Program Files (x86)\Notepad++\
CALL notepad++.exe -multiInst
解决方案
You can use start
:
start notepad++
And there should be no need to use an explicit exit
from the batch (which is done either via goto :eof
or exit /b
) as the start
call returns immediately.
这篇关于如何使用批处理文件时关闭cmd窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文