@echo off setlocal EnableExtensions set "OUTDIR=%~dp0reports" set "OUT=%OUTDIR%\wifi-report.txt" if not exist "%OUTDIR%" mkdir "%OUTDIR%" echo Wi-Fi report > "%OUT%" echo Generated: %DATE% %TIME% >> "%OUT%" echo. >> "%OUT%" netsh wlan show interfaces >> "%OUT%" 2>&1 if errorlevel 1 echo Wi-Fi query failed. Check adapter and WLAN service. >> "%OUT%" echo. >> "%OUT%" echo Saved profiles >> "%OUT%" netsh wlan show profiles >> "%OUT%" 2>&1 echo Report saved to "%OUT%" echo Wi-Fi settings were only read, nothing was changed. exit /b 0