用命令行运行的单进程的任务,要启动多个程序用 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
本文介绍了一个使用命令行批量启动与关闭指定程序的脚本。该脚本能够检查程序是否正在运行,并在未运行时启动它。此外,还提供了关闭特定程序的功能。
489

被折叠的 条评论
为什么被折叠?



