Last active
June 15, 2025 23:41
-
-
Save STashakkori/29b3d01f7239493b5b28f5e8ce21b9a4 to your computer and use it in GitHub Desktop.
Dump registry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
set "RegBackupFile=C:\Users\user\Documents\csd_data\bkp.reg" | |
> "%RegBackupFile%" ( | |
echo Windows Registry Editor Version 5.00 | |
echo. | |
) | |
for %%a in (HKLM HKCU HKCR HKU HKCC) do ( | |
echo Exporting %%a | |
reg export "%%a" "%Temp%\%%a.reg" /y >nul 2>&1 | |
if exist "%Temp%\%%a.reg" ( | |
echo %%a backup created successfully. | |
>> "%RegBackupFile%" echo ; ---------------- %%a ---------------- | |
findstr /v "^Windows Registry Editor Version 5.00" "%Temp%\%%a.reg" >> "%RegBackupFile%" | |
>> "%RegBackupFile%" echo. | |
del "%Temp%\%%a.reg" | |
) else ( | |
echo Failed to create %%a backup. | |
) | |
) | |
echo Done. Full registry backup saved to "%RegBackupFile%" | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment