Overview¶
By default Windows reports most program crashes in a dialog. When this happens, execution is halted until the dialog is closed by the user.
This behavior is undesirable for automatic testing since if an AUT crashes, execution of the current test case — and all subsequent ones — will be blocked.
How to disable error reporting in Windows XP¶
In Windows XP the error reporting dialog is displayed by the "Windows Error Reporting Service" (ERSvc) service. You can start, stop and configure the service in My Computer→Manage→Services, and you can start or stop it with Window's net
command line tool:
To start it again:
How to disable error reporting in Windows Vista and higher¶
In Windows Vista (and higher) the error reporting dialog is displayed by the "Windows Error Reporting Service" (WerSvc) service. You can start, stop and configure the service in My Computer→Manage→Services, and you can start or stop it with Window's net
command line tool:
To start it again:
Starting and stopping this service requires elevated access rights on Windows Vista.
How to close crash dialogs automatically¶
If crash dialogs still appear (for example, ones from the application itself rather than Windows), or if access elevation is not available on Vista, the problem can be worked around by using an AutoHotkey script:
Download and install AutoHotkey .
Write the following to a file called
CloseWindowsCrashPopup.ahk
:
- Start the script by double clicking on it
(You can download the above script as a standalone .exe file
CloseWindowsCrashPopup-1.1.zip
.)