- @fltmc >nul || mshta vbscript:CreateObject("Shell.Application").ShellExecute("%~f0","%*",,"runas",1)(window.close) && exit /b
- @echo off
- for /f "tokens=1,2,3,* delims= " %%a in ('netsh interface show interface ^| find /i "连接"') do (
- if "_%%a" EQU "_已禁用" (
- echo "%%d" 状态是“已禁用”。下面启用:
- netsh interface set interface "%%d" enable && (echo "%%d" 启用成功) || (echo "%%d" 启用失败)
- )
- if "_%%a" EQU "_已启用" (
- echo "%%d" 状态是“已启用”。下面禁用:
- netsh interface set interface "%%d" disable && (echo "%%d" 禁用成功) || (echo "%%d" 禁用失败)
- )
- echo -------------------------------------
- )
-
- pause
复制代码
|