@echo off

:: backup registry
REG DELETE "HKEY_CURRENT_USER\Software\Korzh\CogniTrainer_backup" /f
REG COPY "HKEY_CURRENT_USER\Software\Korzh\CogniTrainer" "HKEY_CURRENT_USER\Software\Korzh\CogniTrainer_backup" /s /f
REG DELETE "HKEY_CURRENT_USER\Software\Korzh\CogniTrainer" /f

:: restore registry
REGEDIT /S "%~dp0settings.reg"