@echo off

:: backup registry
REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Dependency Walker_backup" /f
REG COPY "HKEY_CURRENT_USER\Software\Microsoft\Dependency Walker" "HKEY_CURRENT_USER\Software\Microsoft\Dependency Walker_backup" /s /f
REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Dependency Walker" /f

REG DELETE "HKEY_CLASSES_ROOT\dwifile_backup" /f
REG COPY "HKEY_CLASSES_ROOT\dwifile" "HKEY_CLASSES_ROOT\dwifile_backup" /s /f
REG DELETE "HKEY_CLASSES_ROOT\dwifile" /f

REG DELETE "HKEY_CLASSES_ROOT\dwpfile_backup" /f
REG COPY "HKEY_CLASSES_ROOT\dwpfile" "HKEY_CLASSES_ROOT\dwpfile_backup" /s /f
REG DELETE "HKEY_CLASSES_ROOT\dwpfile" /f

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