Generate a Blue Screen of Death (on purpose!)

bsod

Take a massive dump!

Microsoft claims that Windows Vista is the most stable version of their OS yet… so stable that you may not ever see the dreaded BSOD (or Blue Screen of Death).  Some of the development staff may have been so nostalgic over their lost Blue Friend that they included a hidden way to raise it from the depths.

Before you begin thinking that this is an awesome trick to play on your co-workers (and it is), there actually is a legitimate use for this “feature”.  Developers can use this trick to artificially create a memory dump for testing purposes.  But it’s much more fun for Linux and Mac evangelists to “demonstrate” how fragile Windows can be.

Once you enable this feature, you’ll be able to create a BSOD at any time by pressing a certain key combination on your keyboard.

After you enable the feature, you can generate a memory dump file by holding down the right CTRL key and pressing the SCROLL LOCK key two times. The feature is available for both PS/2 and universal serial bus (USB) keyboards. PS/2 keyboards use the i8042prt.sys driver that is included with the keyboard.

To enable this hidden feature, you must fire up your old friend, REGEDIT and create some new keys.  The branch of the Registry used depends on the type of keyboard on your system.


keyboard type Registry Key
USB keyboard HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters
PS/2 keyboard HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters

Create a new DWORD key and call it CrashOnCtrlScroll.  Give it a value of 1.

Once you reboot your computer you can spawn a BSOD at any time by pressing the following key combination:

  1. Hold down the Right Ctrl key
  2. Press Scroll Lock
  3. Press Scroll Lock again

You can disable this feature by deleting the registry key and rebooting.

There is a limitation with the Kbdhid.sys driver that allows you to generate the memory dump process by using a USB keyboard. The CTRL+SCROLL LOCK+SCROLL LOCK keyboard shortcut does not work if the computer stops responding at a high interrupt request level (IRQL). This limitation exists because the Kbdhid.sys driver operates at a lower IRQL than the i8042prt.sys driver. The USB keyboard feature only works on computers that are running Microsoft Windows Server 2003.

Alan is a web architect, stand-up comedian, and your friendly neighborhood Grammar Nazi. You can stalk him on the Interwebs via Google+, Facebook and follow his ass on Twitter @ocmodshop.