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"'
相關文章
相關標籤/搜索