How to tracert with Autoit
I just wrote a beautiful script which can be used by support team while requesting tracert from client.
the script creates a text file of tracert which the client can email.
filedelete( @tempdir & "\output.txt" ) $ip = InputBox( "TRACERT", "Enter Site or IP", "www.google.com" ) $hops = InputBox( "TRACERT", "Enter Hops", 30 ) $timeout = InputBox( "TRACERT", "Enter Timeout in miliseconds", 1000 ) $output1 = "tracert for "&$ip&" 1.txt" TrayTip( "TRACERT", "Processing, Please Wait", 5, 16) ;RunWait (@ComSpec & " /c " & "tracert" & " -d " & "www.google.com" & " -h " & $hops & " -w " & $timeout & " >> " & @tempdir & "\output.txt", "", @SW_HIDE) RunWait (@ComSpec & " /c " & "tracert" & " -d " & $ip & " -h " & $hops & " -w " & $timeout & " >> " & @tempdir & "\output.txt", "", @SW_HIDE) $output = FileRead( @tempdir & "\output.txt" ) FileWriteLine($output1, $output) filedelete( @tempdir & "\output.txt") $output = StringStripCR ( $output ) msgbox(0,"Tracert Complete",$output)
(Contains 1 attachments.)
