In my console application I have code which looks like
Process DKU = new Process();
DKU.StartInfo.FileName = "MSSQLExecutor.exe";
DKU.Start();
DKU.WaitForExit();
Console.WriteLine("lets move on ");
This is working fine and it waits until MSSQLExecutor.exe finishes its job, then after that
the app continues.
My problem is that sometimes MSSQLExecutor.exe crashes and Windows by default shows a dialog for ending the program. At that point my application will wait forever for the user to click the Close button.
I want to avoid this because MY application is going to run as a service without user interaction.

The Dialog prevents that the process exists.
If
MSSQLExecutoris your Application you should fix the problem.But you can reach the goal (hiding the Dialog). Handle
Application.ThreadExceptionandAppDomain.CurrentDomain.UnhandledExceptionIf
MSSQLExecutoris not your Application you can deactivate Dr. WatsonHKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug
More Infromation