批处理命令如下,保存为批处理文件,执行这一个批处理文件,自动切换启用/禁用“无线网络连接”:
@echo off
netsh interface show interface name="无线网络连接" | find "已启用" /c
if %ERRORLEVEL% equ 0 goto toYes
netsh interface set interface name="无线网络连接" admin=enable
echo 已启用
goto :end
:toyes
netsh interface set interface name="无线网络连接" admin=disable
echo 已禁用
:end
pause