I'm working on a program ("A") which uses ShellExecuteEx to call another program ("B") that occasionally crashes. Program A can detect crash of B, and can kill B using TerminateProcess.
However, when B crashes (and before A has terminated it), up pops Windows' "Program B has stopped working" dialog (WerFault.exe). So although A can kill B, that leaves behind an instance of WerFault.exe each time B fails.
I thought I might have some joy by using the WER api to invoke WerAddExcludedApplication and put B on the excluded list. However, all that seems to do is to change the "has stopped working" dialog so that it offers only "Close" and "Debug", and omits "Check online for a solution".
Any idea how I can get B to just crash without invoking WerFault.exe? (Windows 7).
I did see this thread: How to crash a process on Windows-7 without getting the WER dialog? . However there the intent was to ensure that WER was always invoked, not how to disable or dismiss it.
Suggestions?