@echo off

NET SESSIONS > NUL 2>&1
IF %ERRORLEVEL% NEQ 0 (
	ECHO Error: This script requires administrative privileges.
	EXIT /B 1
)

SET REGDIR="registry"
MKDIR %REGDIR%

REG SAVE HKLM\SYSTEM %REGDIR%\SYSTEM /Y
REG SAVE HKLM\SECURITY %REGDIR%\SECURITY /Y
REG SAVE HKLM\SOFTWARE %REGDIR%\SOFTWARE /Y
REG SAVE HKLM\HARDWARE %REGDIR%\HARDWARE /Y
REG SAVE HKLM\SAM %REGDIR%\SAM /Y
COPY /B /Y C:\Users\Default\NTUSER.DAT "%REGDIR%\NTUSER.DAT"
