Keep 'Has Stopped Working' windows from popping up

The registry way

There's no way like the registry way.

  1. Open an elevated command prompt.

  2. Type or paste the following command, and press Enter:

    reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d 1 /f
    

Additional information

There is also a related, per-user DontShowUI value stored in HKCU\Software\Microsoft\Windows\Windows Error Reporting. Machine settings takes precedence over user settings, and changes are applied immediately.

For testing purposes you can use Bad Application:

[This tool] emulates a bad application. BadApp allows you to change its process priority, start an endless loop (i.e. "hang" or stop responding) and crash its process.


Using the Group Policy Editor

  1. Start gpedit.msc.

  2. Navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Error Reporting.

  3. Double-click the Prevent display of the user interface for critical errors policy, and set it to Enabled.

At least Windows Vista.

This policy setting Prevents the display of the user interface for critical errors.

If you enable this policy setting, Windows Error Reporting does not display any GUI-based error messages or dialog boxes for critical errors.

If you disable or do not configure this policy setting, Windows Error Reporting displays the user interface for critical errors.

Source: Group Policy Search


I don't have a crashing program to test with on-hand, but give this a shot:

  1. Run gpedit.msc to open the policy editor.
  2. Navigate to Computer Configuration > Policies > Administrative Templates > Windows Components > Windows Error Reporting
  3. Enable the "Prevent display of the user interface for critical errors" policy.