|
- @echo off
- setlocal enabledelayedexpansion
- echo 正在获取 Wi-Fi 密码...
- netsh wlan show profile > profiles.txt
- for /f "tokens=2 delims=:" %%i in ('findstr /i "所有用户配置文件" profiles.txt') do (
- set "profile=%%i"
- set "profile=!profile:~1!"
-
- echo WiFi名称: !profile!
- netsh wlan show profile "!profile!" key=clear | findstr /i "关键内容" || echo WiFi密码: 无法获取
- )
- del /f /q profiles.txt
- echo.&echo 查询完成,按任意键关闭窗口! & pause > nul
复制代码
|
|