Skip to content

Commit

Permalink
Dump registry
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Nov 3, 2024
1 parent 0a81280 commit d33faab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions src/grab-registry.bat
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit d33faab

Please sign in to comment.