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.
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.
%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 executionFor a not admin user on WindowsXP-SP2.