;关闭防火墙
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"‘
原文:https://www.cnblogs.com/fina/p/10971794.html