Search code examples
c#.netinternet-explorershdocvw

Exited event of Process fire with delay


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.


Solution

  • 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.