Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"start %comspec% /c script.cmd" vs "start cmd /C script.cmd"

What is the difference between following commands:

start %comspec% /c script.cmd
start cmd /C script.cmd

I need that cmd window for script.cmd should close automatically when script.cmd is finished.

like image 400
Volodymyr Bezuglyy Avatar asked Nov 14 '11 11:11

Volodymyr Bezuglyy


1 Answers

%comspec% just points to cmd.exe, so both commands will do the same thing. Other than that /C is correct, this will close the command prompt after execution

like image 115
Alex Avatar answered Oct 24 '22 15:10

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!