MS-DOS is an operating system and shell used to run commands and provide a command-line interface in Windows operating systems. cmd.exe is used to interpret and provide a console for the MS-DOS command. cmd.exe provides different options where cmd /c is a popular one. cmd /c is used to run commands in MS-DOS and terminate after command or process completion.
运行命令并使用CMD / C终止 (Run Command and Terminate with CMD /C)
We can run commands in MS-DOS or in cmd.exe by using cmd /c. We will also add the command string we want to run. For example, if we want to run ping poftut.com we will issue the following command. The command will create a process that will run command and then terminate after the command execution is completed. Also using ” double quotes in order to surround command are very useful.
运行命令并以CMD / C运行命令提示符终止(Run Command and Terminate with CMD /C On-Run Command Prompt)
We can run cmd /c and related commands from the Run Command prompt. We can open Run Command Prompt from the Start menu or with the Windows Key+R key combination and write the cmd /c "ping poftut.com" command like below. Keep in mind that after the execution of the command is completed the MS-DOS windows will be terminated or closed automatically.