批处理添加防火墙规则,允许程序访问网络。
2023-7-19 乱云飞
@echo offset appPath=C:\1.exe
set ruleName=Allow1EXE
set protocol=TCP
set localPort=Any
set action=Allow
echo 添加防火墙规则...
netsh advfirewall firewall add rule name="%ruleName%" dir=in action=%action% protocol=%protocol% localport=%localPort% program="%appPath%" enable=yes
echo 完成!
pause
本文链接:http://80c.cc/ez/688.html
发表评论: