@echo on

:: backup registry
REG DELETE "HKEY_CURRENT_USER\Software\PrestoSoft\ExamDiff_backup" /f
REG COPY "HKEY_CURRENT_USER\Software\PrestoSoft\ExamDiff" "HKEY_CURRENT_USER\Software\PrestoSoft\ExamDiff_backup" /s /f
REG DELETE "HKEY_CURRENT_USER\Software\PrestoSoft\ExamDiff" /f

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