Skip to content

Instantly share code, notes, and snippets.

@vchirikov
Created August 16, 2019 09:46
Show Gist options
  • Select an option

  • Save vchirikov/8e7adbafc152a4c82b732e5c5b552166 to your computer and use it in GitHub Desktop.

Select an option

Save vchirikov/8e7adbafc152a4c82b732e5c5b552166 to your computer and use it in GitHub Desktop.
Crashdumps
@echo off
rem https://docs.microsoft.com/en-us/windows/desktop/wer/collecting-user-mode-dumps
SET CRASHDUMPPATH=%~dp0
echo Press enter when ready to start collection...
pause
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /reg:64 /f /v Disabled /t REG_DWORD /d 0
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:64 /f /v DumpCount /t REG_DWORD /d 3
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:64 /f /v DumpType /t REG_DWORD /d 2
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:64 /f /v DumpFolder /t REG_EXPAND_SZ /d %CRASHDUMPPATH%
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /reg:32 /f /v Disabled /t REG_DWORD /d 0
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:32 /f /v DumpCount /t REG_DWORD /d 3
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:32 /f /v DumpType /t REG_DWORD /d 2
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:32 /f /v DumpFolder /t REG_EXPAND_SZ /d %CRASHDUMPPATH%
@echo off
rem https://docs.microsoft.com/en-us/windows/desktop/wer/collecting-user-mode-dumps
SET CRASHDUMPPATH=%~dp0
echo Stop collection...
pause
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /reg:64 /f /v Disabled /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:64 /f /v DumpCount /t REG_DWORD /d 3
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:64 /f /v DumpType /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:64 /f /v DumpFolder /t REG_EXPAND_SZ /d %CRASHDUMPPATH%
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /reg:32 /f /v Disabled /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:32 /f /v DumpCount /t REG_DWORD /d 3
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:32 /f /v DumpType /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /reg:32 /f /v DumpFolder /t REG_EXPAND_SZ /d %CRASHDUMPPATH%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment