How can I provoke Windows to hang (freeze)?

Maybe this can help: Forcing a System Crash from the Keyboard

With USB keyboards, you must enable the keyboard-initiated crash in the registry. In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a value named CrashOnCtrlScroll, and set it equal to a REG_DWORD value of 0x01.

You must restart the system for these settings to take effect.

After this is completed, the keyboard crash can be initiated by using the following hotkey sequence: Hold down the rightmost CTRL key, and press the SCROLL LOCK key twice.

Or you could start a fork bomb: see this SO question

There is also NotMyFault

Notmyfault is a tool that you can use to crash, hang, and cause kernel memory leaks on your Windows system. It’s useful for learning how to identify and diagnose device driver and hardware problems, and you can also use it to generate blue screen dump files on misbehaving systems.


It sounds like you're testing the reaction of an external device to an OS becoming unresponsive.

If your hardware can be connected to a virtualized Windows install, then you can pause and resume the virtual machine as many times as you like. Install the desired OS in a VirtualBox (or other desktop virtualization) environment, expose whatever hardware interface is being used (USB, Ethernet, or whatever) to the VM.

You can then pause and resume the virtual machine at will.


At least under an older Windows version (some years ago) the following worked:

I wrote a C program with an endless loop:

while(1) {}

... then I gave that program "realtime priority" in the task manager (there is also an API which can do this).

On a multi-core system I would need to do this multiple times so one loop is running on each core...

Tags:

Windows

Freeze