diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dbb1173..d544331b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,5 +48,8 @@ jobs: path: | build/${{matrix.preset}}/artifacts/* + - name: Dump Registry + run: cd build/${{matrix.preset}}/artifacts && ../../../src/grab-registry.bat + - name: CMake Test run: cd build/${{matrix.preset}} && ctest --verbose diff --git a/src/grab-registry.bat b/src/grab-registry.bat new file mode 100644 index 00000000..09c3b3a3 --- /dev/null +++ b/src/grab-registry.bat @@ -0,0 +1,17 @@ +@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"