I have a windows console app that hosts a WCF service and also transcodes video using DirectShow. I use a great little app called Restart on Crash which reliably detects when a process has exited and automatically restarts it. The trouble is that, many times, a dialog box of one sort or another pops up and prevents the program from closing after a crash until I manually click away the dialog box. Is there a way to prevent a windows console app from showing dialogs on crash?
There is quite detailed answer to a same question on stackoverflow: https://stackoverflow.com/questions/3561545/how-to-terminate-a-program-when-it-crashes-which-should-just-fail-a-unit-test/3637710#3637710
Non code-modifying solution is to open Register Editor and
[HKLM|HKCU]\Software\Microsoft\Windows\Windows Error Reporting\DontShowUI to