0

I have this code:

Process internetExplorerProcess = Process.Start("iexplore", "-noframemerging about:blank");
internetExplorerProcess.EnableRaisingEvents = true;
internetExplorerProcess.Exited += OnInternetExplorerProcessExited;

in this case the exited event is executed immediately.

If we change the first line to open a web instead of a blank page:

 Process internetExplorerProcess = Process.Start("iexplore", "-noframemerging www.stackoverflow.com");

in some machines the exited event does not run immediately, it may take up to twenty seconds.

Extra information:

If during the delay we open the task manager and force the kill of iexplore the event is fired, it seems that some external process blocks the close of iexplore.

We have examined the machine with anti-malware tools and everything is ok.

Javi Quirós
  • 49
  • 11
  • If my understanding is correct, the code is working correctly, it is iexplore.exe that is not exiting properly. You said that if you force kill iexplore.exe, the event fires. This is not a coding issue, it is a Internet Explorer issue. Many things can come into play, and your best bet is a good sysadmin to help you troubleshoot the problem. As is, the question is off-topic in SO terms! – Alexandru Clonțea Mar 05 '18 at 12:17
  • 1
    This is not C# problem, look this article, i hope this can help you: https://answers.microsoft.com/en-us/ie/forum/ie9-windows_vista/after-closing-ie-windows-iexploreexe-processes-are/a3b1536d-1732-4f63-92d3-8fa927946d80 – Anton Komyshan Mar 05 '18 at 12:20

1 Answers1

0

I followed the steps indicated in the post that Anton Komyshan indicated and did not solve the problem, but he helped me find the problem, thanks.

Finally after reconfiguring iexplore, removing plugins and configuration by default, the problem was solved.

Javi Quirós
  • 49
  • 11