以下 VB 脚本打开 CMD 窗口并执行 ping 到 IP – 127.0.0.1
我不明白为什么 CMD 窗口的输出只包括 ping 的结果而不包括“ping 127.0.0.1”?
我的问题需要在我的 VB 脚本中进行哪些更改才能从 CMD 窗口中看到 ping 命令,而不仅仅是 ping 结果?
我的 VB 脚本:
Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd /k CD C:\Program Files & ping 127.0.0.1 " ,1 , true
我从 CMD 看到的只是:( ping 127.0.0.1 not apears ?)
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms