Dos 命令关闭窗口

@echo off

setlocal enabledelayedexpansion

REM set /p port=Please entry Port Number:

for /f "tokens=1-5" %%a in ('netstat -ano ^| find "8761"') do (

if "%%e%" == "" (

    set pid=%%d

) else (

    set pid=%%e

)

echo !pid!

taskkill /f /pid !pid!

)

posted on 2021-04-29 08:54  知识相信未来  阅读(273)  评论(0编辑  收藏  举报

导航