获取本机IP地址的脚本
2004-12-23 20:21
399 查看
用法:保存为一个.vbs文件,双击运行。
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)
WScript.Echo IPConfig.IPAddress(i)
Next
End If
Next
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)
WScript.Echo IPConfig.IPAddress(i)
Next
End If
Next
相关文章推荐
- 原创作品 :使用脚本获取本机IP地址六种方法
- 脚本-根据ip和mask获取网络地址
- Shell脚本中获取本机ip地址的3个方法
- Shell脚本中获取本机ip地址的3个方法
- Shell脚本中获取本机ip地址的3个方法
- Shell脚本中获取本机ip地址的3个方法
- Shell脚本中获取本机ip地址的3个方法
- C#获取本地计算机名IP,Mac地址
- JSP自定义标签获取用户IP地址
- JSP自定义标签获取用户IP地址的方法
- ASP.NET获取IP与MAC地址的方法
- 获取本机IP地址
- netstat获取服务器外部连接IP并过滤出非本地服务器程序有关联的IP脚本
- 获取本机IP地址
- python 获取本机ip地址的两个方法
- 获取用户Ip地址通用方法与常见安全隐患(HTTP_X_FORWARDED_FOR)
- Java根据IP获取地址
- 使用Python获取网段IP个数以及地址清单
- java获取mac地址-屏蔽ip封mac地址
- Linux C 网络编程 - 获取本地 ip 地址,mac,通过域名获取对应的 ip