Guide to Enable Minidumps on Windows Using a Batch Script

Guide to Enable Minidumps on Windows Using a Batch Script

  • Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Guide to Enable Minidumps on Windows Using a Batch Script


Enabling minidumps on Windows can be done by modifying the system registry and ensuring that the pagefile is appropriately configured. Below is a step-by-step guide to achieve this using a batch script.

Create the Batch Script

  1. Open Notepad:
    • Press Win + R, type notepad, and press Enter.
  2. Write the Batch Script:
    • Copy and paste the following code into Notepad:
Code:
@echo off
REM Batch file to enable minidump creation on Windows 10 and 11

echo Enabling Minidump Creation...

REM Set system properties for minidump creation
echo Configuring system properties...
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 3 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v "MinidumpDir" /t REG_EXPAND_SZ /d "%SystemRoot%\Minidump" /f

REM Ensure the pagefile exists and is properly sized
echo Configuring pagefile settings...
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d "C:\pagefile.sys 0 0" /f

REM Configure Startup and Recovery settings
echo Configuring Startup and Recovery settings...
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v LogEvent /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v AutoReboot /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v OverwriteExistingDebugFile /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v "CrashDumpEnabled" /t REG_DWORD /d "3" /f



REM Restart the computer to apply changes
echo Restarting the computer to apply changes...
shutdown.exe -r -t 00

echo Minidump creation enabled successfully.

Save the Batch Script

  1. Save the File:
    • Click File > Save As.
    • In the “Save as type” dropdown, select All Files.
    • Name your file with a .bat extension, for example, enable_minidumps.bat.
    • Choose a location to save it, such as your Desktop or Documents folder.

Run the Batch Script

  1. Run as Administrator:
    • Right-click on the saved batch file (enable_minidumps.bat) and select Run as administrator.
    • If prompted by User Account Control (UAC), click Yes to allow it to make changes.
  2. Verify Execution:
    • A Command Prompt window will open, execute the commands, and display a message indicating that the minidump configuration has been updated.
    • Press any key to close the Command Prompt window when prompted.
Note: This batch file will reboot your computer immediately!! So save any work prior to running it!!
Author
Malnutrition
Views
857
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Malnutrition