|
发表于 2023-5-16 12:48:04
|
显示全部楼层
@Echo off
set output=output.txt
echo. > %output%
echo Network Adapters: >> %output%
wmic nicconfig where "IPEnabled='True'" get Description,IPAddress,IPSubnet,DefaultIPGateway,DNSServerSearchOrder,MACAddress >> %output%
echo WiFi SSID: >> %output%
netsh wlan show profile | findstr /C:"All User Profile" /C:"User Profile" >> %output%
for /F "tokens=2 delims=: " %%i in ('netsh wlan show profile ^| findstr /C:"All User Profile" /C:"User Profile"') do (
set "profile=%%i"
call :getSSID !profile!
)
goto :eof
:getSSID
set ssid=
for /f "tokens=2 delims=:" %%s in ('netsh wlan show profile name^=%1^|findstr /C:"SSID name"') do (
set ssid=%%~s
)
echo %1: %ssid% >> %output%
goto :eof
|
|