0

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
1
  • You can't since the batch file called notepad++. Why are you calling it from a batch file instead of making a shortcut? Commented Mar 27, 2012 at 18:24

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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++?

1 Comment

The usual reason is lack of support for relative paths in shortcuts

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.