netsh方式- set %program%="D:\Program Files\realVNC\VNC-Viewer.exe"
- netsh advfirewall firewall add rule name="bbb" profile=public,private dir=out program=%program% action=block
- set count=0
- :Loop
- set /a count+=1
- echo count: %count%
- netsh advfirewall firewall set rule name="bbb" new enable=no
- choice /t 5 /d y /n >nul
- netsh advfirewall firewall set rule name="bbb" new enable=yes
- choice /t 8 /d y /n >nul
- goto :Loop
复制代码
|