1. 程式人生 > >batch指令碼開啟cmd然後執行命令

batch指令碼開啟cmd然後執行命令

 開啟
  1. @echo off    
  2. start cmd /k "cd/d d:\work\dws.txt &&notepad.exe -batchmode &&taskkill /f /t /im cmd.exe" 

關閉

  1. @echo off  
  2. start cmd /k "taskkill /f /t /im notepad.exe &&taskkill /f /t /im cmd.exe"