What Im trying to do is to close the cmd after running a cargo tomcat server through a batch script.. I've tried attempts such as;
start mvn -P cargo.run && exit
start "" mvn -P cargo.run exit
start "" mvn -P cargo.run -Drepo.path=storage exit /b
none of them seems to work, and the cmd is still staying open. As seen in the SS.
Anyone who might know how it could be done?
[
]
- OS windows 7
what you try, is like
(start ... ) && exit. You needstart (... & exit)(logical notation, will not work like this).You have to escape the
&to be passed to the new instance:If you need
&&, escape both of them:(
&= "and then",&&= "if previous command was successful, then")