firewall

firewall

使用 netsh advfirewall 屏蔽某程序访问网络

;关闭防火墙
nsExec::Exec 'cmd /c netsh advfirewall set allprofiles state off'
;开启防火墙
nsExec::Exec 'cmd /c netsh advfirewall set allprofiles state on'
;删除屏蔽
nsExec::Exec 'cmd /c netsh advfirewall firewall Delete rule name="TIM"'
;添加屏蔽
nsExec::Exec 'cmd /c netsh advfirewall firewall add rule name="TIM" dir=out action=block program="C:\Program Files\TIM Lite\Bin\TIM.exe"'
相关文章
相关标签/搜索