命令行查看WIFI密码
netsh wlan show profiles 查看WIFI名称
netsh wlan show profile name=“WiFi名称” key=clear 关键内容为WiFi密码
以文本形式输出WIFI
只能在命令界面运行
for /f "skip=10 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @for /f "tokens=1-2 delims=:" %k in ('netsh wlan show profiles %j key ^= clear ^|findstr /i "关键内容"') do @echo %j,%l>> %USERPROFILE%\desktop\WiFi名称及密码.txt
执行结果
执行前:
执行后: