Advertisement
Guest User

Untitled

a guest
May 12th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set objShell = WScript.CreateObject ("WScript.Shell")
  2. Set objShellExec = objShell.Exec ("netsh interface show interface")
  3. 'msgbox objShellExec.StdOut.ReadAll'
  4. Do
  5.     strLine = objShellExec.StdOut.ReadLine
  6.     'msgbox strLine
  7.     i = i + 1
  8.     'arrLine = split(strLine, " ")
  9.     'msgbox arrLine(0)
  10.    
  11. Loop While Not i > 2
  12.  
  13.  
  14. Do
  15.     strLine = objShellExec.StdOut.ReadLine
  16.    
  17.     arrLine = split(strLine, " ")
  18.    
  19.     j=0
  20.     sname = ""
  21.     for i=0 to ubound(arrLine)
  22.         if arrLine(i) <> "" then
  23.             j=j+1
  24.         end if
  25.        
  26.         if j> 3 then
  27.             sname=sname & " " & arrLine(i)
  28.         end if
  29.     next
  30.     msgbox sname
  31.    
  32. Loop While Not objShellExec.StdOut.atEndOfStream
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement