- UID
- 10253
- 帖子
- 3334
- 精华
- 0
- 贡献
- 20
- 推广
- 0
- 有效BUG
- 0
- 来自
- 江门·中国
- 注册时间
- 2006-4-28
|
2#
发表于 2007-12-29 02:12
| 只看该作者
以下代码来自 microsoft.. 保存为 ip.vbs 看看有什么?
或者命令行下 ipconfig /all 看看..
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
- Set IPConfigSet = objWMIService.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)
- WScript.Echo IPConfig.IPAddress(i)
- Next
- End If
- Next
复制代码 |
|