@echo off::port为需要去绑定端口set port=8888for /f "tokens=5 delims= " %%a in (‘netstat -ano ^|findstr /c "%port%"‘) do ( echo pid=%%ataskkill /f /pid %%aGOTO :OUTFOR):OUTFORpause
socket端口绑定后通过bat干掉
原文:http://www.cnblogs.com/chairmanming/p/6886621.html