When using .NET\'s Process.Start to run IE8\'s iexplore.exe, and if you already have another IE8 window open, then the iexplore.exe process that you just started will immedi
I did it using a non-optimal solution - get a list of all iexplore.exe process IDs before running my iexplore.exe, then get the same list again after iexplore.exe is invoked. Do a diff between the two lists, the extra PID will be the one I've created. This of course won't work in certain cases (other apps or the user started extra iexplore.exe processes while the detection code is running, or IE did some kind of rearrange/recreation of processes as an internal maintenance task).
As a workaround you may want to force IE to start a new instance (passing -nomerge
command line argument):
Process objProcess = Process.Start("IEXPLORE.EXE", "-nomerge http://google.com/");