VBScript getting results from Shell
You will want to use the WshShell object’s Exec method instead of Run. Then simply read the command line’s output from the standard streams. Try this one: Const WshFinished = 1 Const WshFailed = 2 strCommand = “ping.exe 127.0.0.1” Set WshShell = CreateObject(“WScript.Shell”) Set WshShellExec = WshShell.Exec(strCommand) Select Case WshShellExec.Status Case WshFinished strOutput = WshShellExec.StdOut.ReadAll … Read more