disable crashed application dialog for invoked process

1.8k views Asked by At

I start a process from an application to monitor it. It may crash or hang.

The monitoring application is prepared for this and can handle this.

But on a crash windows shows a application crash dialog. At this point the crashed process is still in the process list. But the dialog does not disappear if the process is going to be terminated by the monitoring app (after timeout with TerminateProcess).

I tried to disable the Windows Error Reporting for this application by using the WerAddExcludedApplication and WerRemoveExcludedApplication but this only removes the option to search online for a solution.

I also do not want to entirely disable WER.

Is there another way to programmatically disable this dialog for a given executable (it will not always be the same)?

1

There are 1 answers

3
PerryC On

I think what you're looking for is the DontShowUI registry key. This will leave Windows Error Reporting (WER) enabled and simply not pop anything up on an unhanded exception.

DontShowUI (REG_DWORD) Possible values:

0 - UI (default)

1 - No UI (Enable or disable the WER UI)

Link to WER registry settings: https://msdn.microsoft.com/en-us/library/windows/desktop/bb513638(v=vs.85).aspx

You could set this in the registry here (or also in HKEY_CURRENT_USER):

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting]
"DontShowUI"=dword:00000001

If you set this key and are still seeing a dialog box on an unhandled exception, I would reccomend searching through the registry for any Value = DontShowUI as I've sometimes found them set in odd places (and honored by Windows).