.版本 2
.支持库 script

脚本组件1.语言 ＝ “VBScript”
脚本组件1.执行 (#常量1)
输出调试文本 (脚本组件1.运行 (“GetIP”, ))

 

'===================常量1========================

Function GetIP()
 strIP = ""
 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
  strIP = strIP + IP + "|"
 Next
 End If
 Next
 GetIP = strIP
End Function

'===================常量1========================