Just use your command line or cmd/bat file and disable your Wi-Fi adapter:
%__APPDIR__%wbem\wmic.exe path win32_networkadapter where NetConnectionID="Wi-fI" call disable
To enable:
%__APPDIR__%wbem\wmic.exe path win32_networkadapter where NetConnectionID="Wi-fI" call enable
Obs.: This command line needs administrator rights
Read more
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/QbV1J.gif)
You can also use a hybrid bat file with the code vbs, which will call the airplane interface mode and disable it by sending the [space] key:
0<!-- :
@cls & @echo off && mode 50,03 && title <nul && title .\%~nx0 && explorer.exe ms-settings:network-airplanemode
%__APPDIR__%wScript.exe "%~dpnx0?.wsf" && 2>nul >nul %__APPDIR__%taskkill.exe /FI "WindowTitle eq settings*"
goto :EOF & rem :: --> <job> <script language = "vbscript">
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.AppActivate "settings"
WScript.Sleep 333
objShell.SendKeys " "
WScript.Sleep 333 </script></job>
0<!-- : &@cls & @echo off && mode 50,03 && title <nul && title .\%~nx0 && explorer.exe ms-settings:network-airplanemode
%__APPDIR__%wScript.exe "%~dpnx0?.wsf" && 2>nul >nul %__APPDIR__%taskkill.exe /FI "WindowTitle eq settings*"
goto :EOF & rem :: --> <job> <script language = "vbscript"> Set objShell = WScript.CreateObject("WScript.Shell")
objShell.AppActivate "settings": WScript.Sleep 500: objShell.SendKeys " ": WScript.Sleep 777: </script></job>
Obs.: For close/kill windows/interface, you need edit the correct name of windows title, in pt-BR work with configur*
, I suppose in English maybe setting*
:
2>nul >nul %__APPDIR__%taskkill.exe /FI "WindowTitle eq settings*"
2>nul >nul %__APPDIR__%taskkill.exe /FI "WindowTitle eq settings*"