Set objExec = objShell.Exec("arp -a")
Do
strTemp = objExec.StdOut.ReadLine
objReg.Pattern = strMacPattern
Set arrMac = objReg.Execute(strTemp)
objReg.Pattern = strIPPattern
Set arrIP = objReg.Execute(strTemp)
For Each strMac In arrMac
For Each strIP In arrIP
objFile.WriteLine "arp -s " & strIP & " " & strMac
Next
Next
Loop Until objExec.StdOut.AtEndOfStream
objFile.Close
strScriptPath = Replace(WScript.ScriptFullName,WScript.ScriptName,"")
Set objExec = objShell.Exec(strScriptPath & "temp.bat")
Do While objExec.Status = 0
WScript.Sleep 1000
Loop
objFSO.DeleteFile strScriptPath & "temp.bat"
WScript.Echo "Done!"
……