vbs CloseIEAll 收集
上一篇 /
下一篇 2012-03-28 11:17:42
/ 个人分类:QTP
1.
Set desc=description.Create
desc("micclass").value="Browser"
Set List=Desktop.ChildObjects(desc)
Maxindex=List.count-1
For i=0 to Maxindex
Hwnd=List(i).GetRoProperty("hwnd")
systemutil.CloseProcessByHwnd Hwnd
Next
End Sub
2.
Sub CloseIEAll
Dim wmi,pro_s, p
Set wmi=GetObject("winmgmts:\\.")
Set pro_s=wmi.instancesof("win32_process")
For Each p In pro_s
If p.name="iexplore.exe" then p.terminate() end if
Next
End Sub
3.
While Browser("CreationTime:=0").Exist
Browser("CreationTime:=0").Close
Wend
收藏
举报
TAG:
vbs
VBS
CloseIEAll