如何禁用Windows应用程序崩溃报告?

I am trying to invoke external program (in my case IECapt.exe) in php function exec() on windows.

It works well most of the time, but when IECapt.exe crash, windows pop-up a crash prompt window,

and php script hangs there wait this prompt window closed, so how to disable such pop-up crash window?

because my php script need run as a daemon, and not expected paused when this happens.

how to make it just quit when crash?

thanks for your suggestions.

Set an exception filter via SetUnhandledExceptionFilter that calls TerminateProcess.