我对VBS不熟,以前倒是有个例子,可惜找不着了。下面这个不知可否解燃眉之急:ComputerName = InputBox("Enter the name of the computer you wish to query")set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &"").ExecQuery("select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
 set IPConfigSet = GetObject("localhost")for each IPConfig in IPConfigSet
if Not IsNull(IPConfig.IPAddress) then 
for i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
WScript.Echo "IPAddress: " & IPConfig.IPAddress(i)
next
end if
next运行方法:
1.将以上代码存为ip.vbs,放到c:\下;
2.进入DOS方式,输入:wscript ip.vbs,在弹出地窗口中输入:localhost