一个是启用以太网,一个是启用WLAN
必须以管理员身份运行才能生效
1.启用以太网(就是插线联网的)
if exist "%SystemRoot%\SysWOW64" path %path%;%windir%\SysNative;%SystemRoot%\SysWOW64;%~dp0
@echo off
netsh interface set interface Ethernet enabled
2.启用WLAN
if exist "%SystemRoot%\SysWOW64" path %path%;%windir%\SysNative;%SystemRoot%\SysWOW64;%~dp0
@echo off
netsh interface set interface Ethernet disabled
netsh interface set interface WLAN enabled
3.注意上面中 Ethernet 、WLAN可以重新命名
(控制面板->网络和共享中心->左侧的-》更改适配器设置)