I start a new process which in this case will be IE with the following code :
Code:
p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(p_Exited);
p.StartInfo.FileName = tempFilename;// mydoc.xml
p.StartInfo.CreateNoWindow = false;
p.Start();
I have noticed an unusual behaviour.
For some strange reason the Exited event is fired straight after IE opens and not just when I exit. I have also noticed that when the file type is a .doc file resulting in Word opening the Exit event doesn't fire at all. Even when exiting Word.

To make things wierder, if I try an excel file Excel opens fine and fires the event at the correct time.

Has anyone come across this strange behaviour ?