[分享]在QTP取得IP地址

上一篇 / 下一篇  2007-03-29 17:02:43 / 个人分类:QTP


set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

for each IPConfig in IPConfigSet
if Not IsNull(IPConfig.IPAddress) then
for i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
Msgbox IPConfig.IPAddress(i)
next
end if
next


TAG: QTP

引用 删除 kolecat   /   2007-11-30 03:30:09
不错,很多都很有用,3q
阿土伯学习笔记 引用 删除 jzhao   /   2007-03-30 09:51:01
多谢分享,不过能有文字解释可能会更好些。辛苦了!
 

评分:0

我来说两句

Open Toolbar