неділя, 10 грудня 2017 р.

WiFi settings backup on Windows 8

One of things that I hate is when you ask to provide you WiFi password in cafe but they simply type it on your device and connect instead of providing the password itself. And on some devices it may be really tricky just to find out existing settings.

Windows OS offers pretty good and simple way for having all WiFi networks dumped and backed up. You can easily find credentials to any network you've been connected before and use it on your another device.

WiFi_Backup.sh
set BACKUP_DIR="C:\Backup"set TMP_DIR="%BACKUP_DIR%\WiFI"set CUR_DATE=%date:~-4%_%date:~3,2%_%date:~0,2%mkdir %TMP_DIR%cd %BACKUP_DIR% echo Performing WiFI backup...netsh wlan export profile key=clear folder="%TMP_DIR%"
echo Adding to archive..."c:\Program Files\7-Zip\7z.exe" a -t7z "%BACKUP_DIR%\WiFi_Backup_%CUR_DATE%.7z" "%BACKUP_DIR%\WiFi\"
echo Removing files...del /F /Q "%TMP_DIR%\*.*" rmdir %TMP_DIR%

References:

  • https://winaero.com/blog/how-to-backup-your-wireless-network-profiles-in-windows-8-1-and-windows-8/
  • https://stackoverflow.com/questions/1192476/format-date-and-time-in-a-windows-batch-script