How to automatically close cmd window after batch file execution?

后端 未结 8 1627
半阙折子戏
半阙折子戏 2020-11-30 23:47

I\'m running a batch file that has these two lines:

start C:\\Users\\Yiwei\\Downloads\\putty.exe -load \"MathCS-labMachine1\"
\"C:\\Program Files (x86)\\Xmi         


        
8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 00:24

    Just try /s as listed below.

    As the last line in the batch file type:

    exit /s
    

    The above command will close the Windows CMD window.

    /s - stands for silent as in (it would wait for an input from the keyboard).

提交回复
热议问题