- @echo off
- set name=%~n0
- :echo 当前文件名为:%name%
-
- if "%name%" == "wifioff" (
- goto 1
- ) else (
- goto 2
- )
-
-
-
- :1
- @netsh interface set interface 无线网络连接 enabled
- echo WIFI已经打开
- ren wifioff.bat wifion.bat
-
-
- :2
- @netsh interface set interface 无线网络连接 disabled
- echo WIFI已经关闭
- ren wifion.bat wifioff.bat
-
- pause>nul
复制代码
|