I have an application that sometimes causes exceptions. And I need to restart it if it crashed. But the problem is, that I have Windows 7 here and when application crashes, Windows shows me nice dialog box with a suggestion to close the application. But the application itself is still running until I click "Close". How to get rid of this Window and make application terminate immediately without any dialog boxes?
Ideally you would catch all exceptions in the most outer scope of your program. However, sometimes you don't have the luxury of making such changes and the crash dialogs prevent you from recovering from a crash. In these cases you can consider disabling Windows Error Reporting, either entirely or for a specific program.
On Windows 7: Start Orb -> Control Panel -> Action Center -> Maintenance -> Check for solutions to problem reports -> Settings
Update: to completely disable the error reporting UI change the DontShowUI registry setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\DontShowUI