Reputation: 5
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
Upvotes: 0
Views: 14602
Reputation: 354346
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.
Upvotes: 5
Reputation: 1133
You can exit from command line only after quiting from notepad++.
1. If you wanna exit from cmd after quiting from notepad++, add EXIT to the end of your batch file.
2. Why don't you use shortcut instead of batch file to start notepad++?
Upvotes: 0