How to write a ping to a text file using VBS
If I am using VBS to run some CMD commands, in this example ping, how could I write the command to a text file using VBS not DOS? Set objCmdTest = WScript.CreateObject ("WScript.Shell") Set Output = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\vbs\test.txt",8,true) Output.WriteLine (objCmdTest.run ("ping failboat")) Output.WriteLine (objCmdTest.run ("ping 8.8.8.8")) So this is what I'm working with however what happens is; The script runs, the file is made, 2 command prompts open to run the pings and finally the text inside the file reads: 0 0 When I'd much prefer it to have the