samedi 9 mai 2015

How to Close CMD after starting an program

I have wrote a batch file that opens two CMD windows in the folder I want so that I can run a server and type commands. I also want to be able to open firefox and sublime editor.

Everything works except I am left with 4 cmd windows not just the two I want.

@ECHO OFF
start cmd.exe /K "cd C:\xampp\htdocs\restful"
start cmd.exe /K "cd C:\xampp\htdocs\restful"
cd "C:\Program Files\Mozilla Firefox\"
start cmd.exe /K "firefox.exe"
cd "C:\Program Files\Sublime Text 3\"
start cmd.exe /K "sublime_text.exe"
exit

I am running on Windows XP for my sins, so if anyone can help I would appreciate it.

Aucun commentaire:

Enregistrer un commentaire