Windows uses batch command to turn off firewall

1. Create a new notepad file and name it whatever you want.
2. Open Notepad, copy and paste the following code, and then save it.
@echo off
echo 用批处理关闭防火墙,包括家庭和工作网络位置、公用网络位置设置。
netsh firewall set opmode mode=disable profile=ALL
netsh firewall set opmode mode=disable
echo 防火墙已关闭
pause
3. After saving, change the suffix of the notepad file from txt to bat, and then confirm.
4. Select the file, then right-click and select "Run as administrator". After the execution is successful, the firewall will be closed.

Guess you like

Origin blog.csdn.net/liuhuanping/article/details/132200651