`

批处理启动程序

阅读更多
用命令行运行的单进程的任务,要启动多个程序用 start cmd /c notepad.exe

set fileName=%1
 
set found=

for /f "tokens=*" %%a in ('tasklist ^| findstr /i "%fileName%"') do set found=Y

if not "%found%"=="Y" start cmd /c "%fileName%"


关闭程序
taskkill /f /im notepad.exe
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics