- ' goodidea <a href="mailtmyad@yeah.net" target="_blank" >myad@yeah.net</A>
- Sub ip_REMOTECOMPUTER()
- Dim OpSysSet, OpSys, ComputerName
- ComputerName = "LOCALHOST"
- Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate}//" & ComputerName) _
- .ExecQuery("SELECT index, IPAddress FROM Win32_NetworkAdapterConfiguration ")
- For Each OpSys In OpSysSet
- If TypeName(OpSys.ipaddress) <> "Null" Then
- For Each ip In OpSys.ipaddress
- MsgBox ip
- Next
- End If
- Next
- End Sub
复制代码
[此贴子已经被作者于2004-6-28 19:43:41编辑过]
|