LoWang Posted July 16, 2015 Posted July 16, 2015 (edited) Hello, I made not very pleasant discovery...##Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Change2CUI=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $p1=ping("9.17.137.11") consolewrite("ping() result:"&$p1&" @error:"&@error&@crlf) $p2=runwait('cmd.exe /c ping 9.17.137.11 -n 2') consolewrite("cmd.exe ping result: "&$p2&" (0 means success)"&@CRLF)The output is:ping() result:0 @error:2 Pinging 9.17.137.11 with 32 bytes of data: Reply from 9.17.137.11: bytes=32 time=176ms TTL=127 Reply from 9.17.137.11: bytes=32 time=219ms TTL=127 Ping statistics for 9.17.137.11: Packets: Sent = 2, Received = 2, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 176ms, Maximum = 219ms, Average = 197ms cmd.exe ping result: 0 (0 means success)Why can't ping() ping it but cmd ping can? @error 2 means Host is unreachable. I need this in a virtual box virtual machine running on Linux VPNed to my work. I haven't tried it at work yet if it works with direct connection... Edited July 16, 2015 by LoWang
JohnOne Posted July 16, 2015 Posted July 16, 2015 (edited) Perhaps AutoIt does not have permissions.Make sure it is allowed internet access in any security software you are running. Edited July 16, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
jvds Posted July 16, 2015 Posted July 16, 2015 you need to give your line with runwait a very good look
LoWang Posted July 17, 2015 Author Posted July 17, 2015 So now I am connected directly in the office and ping() works too...ping() result:171 @error:0 Pinging 9.17.137.11 with 32 bytes of data: Reply from 9.17.137.11: bytes=32 time=171ms TTL=127 Reply from 9.17.137.11: bytes=32 time=172ms TTL=127 Ping statistics for 9.17.137.11: Packets: Sent = 2, Received = 2, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 171ms, Maximum = 172ms, Average = 171ms cmd.exe ping result: 0 (0 means success)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now