Batch file to enable and force a memory dump

A colleague who is a consultant passed on the following tip to me about how to enable and force a memory dump on a server by running this batch file at a command prompt:

REM ENABLE COMPLETE MEMORY DUMP

REG ADD HKLM\SYSTEM\CurrentControlSet\Control\CrashControl /v CrashDumpEnabled /t REG_DWORD /d 0x1 /f

REM ENABLE DUMP VIA PS/2

REG ADD “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters” /v CrashOnCtrlScroll /t REG_DWORD /d 1 /f

REM ENABLE DUMP VIA USB

REG ADD “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters” /v CrashOnCtrlScroll /t REG_DWORD /d 1 /f

Once you’ve run the above batch script on the server, you can force the system to crash and generate a memory dump by holding down the right CTRL key and pressing the SCROLL LOCK key twice. Thhis will cause a bug check with error code 0xE2 and the resulting dump file will be created in %SystemRoot%\MEMORY.DMP.

Mitch is a ten-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows Server and cloud computing technologies.  For more information see http://www.mtit.com.

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top