用vbs得到计算机的 IP 地址
更新时间:2007年05月14日 00:00:00 作者:
描述
返回安装在计算机中的每个支持 IP 的网络适配器的 IP 地址。
脚本代码
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
返回安装在计算机中的每个支持 IP 的网络适配器的 IP 地址。
脚本代码
复制代码 代码如下:
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
相关文章
ass2srt.vbs(ass/ssa批量转换srt的脚本)
这篇文章主要介绍了ass2srt.vbs一个ass/ssa批量转换srt的脚本,需要的朋友可以参考下2014-09-09
最新评论