Link to home
Start Free TrialLog in
Avatar of Christopher Schene
Christopher ScheneFlag for United States of America

asked on

How do I get process information about IE window

I am using the vb.net code below to find an instance of IE that is displaying a particular URL.

How can I also get the process information? If I could get the process ID then I could find the process. Thanks.

Dim window As SHDocVw.InternetExplorer
SA = CreateObject("Shell.Application")
            Dim windowCount As Integer = SA.windows().count()
            For Each window In SA.windows()
                Dim WindowURL = window.LocationURL
                logmessage("check windowURL = " & WindowURL)
                If InStr(WindowURL, URLToCheck) > 0 Then
                    logleave("IsWebTopPageOpen:success")
                    Return window
                End If
            Next
Avatar of David
David
Flag of United States of America image

try this
http://powertoe.wordpress.com/2010/11/10/finding-the-thread-pid-that-belongs-to-a-tab-in-ie-8-with-powershell/

Granted it is powershell, but you can always do this from VBS and trap/process the output

But I'm not 100% sure that javascript doesn't allow the same process ID to have more than one window, so this may not even be possible in the first place.
Avatar of Christopher Schene

ASKER

Thanks but I can't user PS as I am running ie7 on an XP machine.

This is vb.net code, BTW.

I am pretty sure that if I get a window handle that there is a way to get the process id from the window handle....just not sure exactly how
Avatar of Tushar Darwatkar
Tushar Darwatkar

Hello,

Did you tried using "Process Explorer v15.3" to track the process. If no please try installing it from below link ans share your experience.

http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
ASKER CERTIFIED SOLUTION
Avatar of Christopher Schene
Christopher Schene
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Answered my own question