1.找到网络连接,如下图:
2.打开记事本,拷贝如下脚本,修改需要切换的名称,如:netsh interface set interface name="以太网" admin=DISABLED
-----------------------------------------------------------------------------------------------------------------------
@ echo off
echo 正在启用超级管理员权限...
%1 %2
ver|find "5.">nul&&goto :st
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :st","","runas",1)(window.close)&goto :eof
:st
copy "%~0" "%windir%\system32\"
echo 启用超级管理员权限成功
@echo off
echo 本地网络与无线网络切换,请输入字符
set /p input= 本地(L) 无线(W):
if "%input%"=="L" goto Y
if "%input%"=="W" goto N
:Y
echo 启用本地连接
netsh interface set interface name="WLAN" admin=DISABLED
netsh interface set interface name="以太网" admin=ENABLED
pause
exit
:N
echo 禁用本地连接
netsh interface set interface name="以太网" admin=DISABLED
netsh interface set interface name="WLAN" admin=ENABLED
pause
exit
-----------------------------------------------------------------------------------------------------------------------
3.将记事本保存为bat格式
4.双击即可执行,如下: