[windows bat] How to start a new cmd window and execute commands inside it

 

Two ways:

1,

start cmd /k echo Hello, World!

 

2,

start cmd /C pause

 

The difference is that after the second execution is completed, the newly opened window will be automatically closed, while the first one will not.

Reference: http://stackoverflow.com/questions/9392874/bat-file-open-new-cmd-window-and-enter-code-in-there

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326802186&siteId=291194637