Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Set objShell = CreateObject("WScript.Shell") Set objWshScriptExec = objShell.Exec("ipconfig /all") Set objStdOut = objWshScriptExec.StdOut ' ' Skip first four lines ' strLine = objStdOut.ReadLine WScript.Echo strLine strLine = objStdOut.ReadLine WScript.Echo strLine strLine = objStdOut.ReadLine WScript.Echo strLine strLine = objStdOut.ReadLine WScript.Echo strLine ' ' Add date/time information ' strCurrentTime = " Current Date/Time. . . . . . . . .: " & Now() WScript.Echo strCurrentTime ' ' Display the rest of the output ' While Not objStdOut.AtEndOfStream strLine = objStdOut.ReadLine WScript.Echo strLine Wend
objShell = ObjectOpen("WScript.Shell") objWshScriptExec = objShell.Exec("ipconfig /all") objStdOut = objWshScriptExec.StdOut ;Skip first four lines line = "" strLine = objStdOut.ReadLine line = strCat(line,strLine,@CRLF) strLine = objStdOut.ReadLine line = strCat(line,strLine,@CRLF) strLine = objStdOut.ReadLine line = strCat(line,strLine,@CRLF) strLine = objStdOut.ReadLine line = strCat(line,strLine,@CRLF) ; Add date/time information strCurrentTime = StrCat(" Current Date/Time. . . . . . . . .: " , TimeDate() ) line = strCat(line,strCurrentTime,@CRLF) ; Display the rest of the output While ! objStdOut.AtEndOfStream strLine = objStdOut.ReadLine line = strCat(line,strLine,@CRLF) Endwhile Message("IPCONFIG OUTPUT", line)
Article ID: W16070
File Created: 2004:03:30:15:42:42
Last Updated: 2004:03:30:15:42:42