Forcing a System Crash on a Unresponsive PC
Posted by William Diaz on July 20, 2010
This one comes in handy when a Windows based PC experiences a so-called “hard hang” and you need to force it to bug check and produce a dump for debug purposes. From the Windows registry:
For USB keyboards go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a DWORD value named CrashOnCtrlScroll equal to 11
For PS/2 keyboards go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters, create a DWORD value named CrashOnCtrlScroll equal to 1
You will need to reboot afterwards. A crash can now be initiated by holding down the right CTRL key and pressing the Scroll Lock key twice.
Some laptop keyboards do not have a scroll lock key and you will need to find the substitute (usually the fn key). Alternatively, to workaround this, see this MSDN link for how to setup alternate key combinations: http://msdn.microsoft.com/en-us/library/ff545499.aspx. In my case, I have no function key as a substitute on my laptop so I have also defined right Ctrl+BackSpace x2. You will need to obtain the hex code (scancode table) of the key you will be using for the for the Dump2Key DWORD2:
When you manually crash Windows, the dump will tell you this after opening with WinDbg. It is your job to find the culprit in the stack output or by digging deeper into the dump.
1Windows XP does not support this means of crashing the OS via a USB keyboard, only Win7, Server 2008, and Server 2003 SP2 or SP1 with Hotfix 244139 and Vista SP1 with Hotifx 971284. You can also use the Dump Configurator from CodePlex here.
2Note, you will need to disable the CrashOnCtrlScroll DWORD created above for this to work by changing the value to 0 or deleting it.