Christopher Schene
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.Applic ation")
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
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.Applic
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
Return window
End If
Next
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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Answered my own question
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.