只需使用您的命令行或cmd/bat文件,然后禁用您的Wi-Fi适配器。
%__APPDIR__%wbem\wmic.exe path win32_networkadapter where NetConnectionID="Wi-fI" call disable
启用:
%__APPDIR__%wbem\wmic.exe path win32_networkadapter where NetConnectionID="Wi-fI" call enable
注意:此命令行需要管理员权限
阅读更多
#2 选项
您还可以使用混合的bat文件和代码vbs,它将调用飞机接口模式并通过发送[空格]键来禁用它:
0
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.AppActivate "settings"
WScript.Sleep 333
objShell.SendKeys " "
WScript.Sleep 333
或者,压缩的代码...
0
Obs.: 关于关闭/结束窗口/界面,你需要编辑正确的窗口标题名称,在pt-BR中使用"configur*",我猜想在英语中可能是"setting*":
2>nul >nul %__APPDIR__%taskkill.exe /FI "WindowTitle eq settings*"
2>nul >nul %__APPDIR__%taskkill.exe /FI "WindowTitle eq settings*"