Results 1 to 2 of 2

Thread: Waiting on ping

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    1

    Waiting on ping

    I'm working on an application that goes through a given list of IP addresses, pings each one, and returns the result.

    The code for pinging looks like:

    Dim objWSHShell As New WshShell
    Dim objPingExec As WshExec

    Set objPingExec = objWSHShell.Exec("ping -n 2 -w " & CStr _ (i_lPingTimeout) & " " & i_strTargetPC)

    i_lPingTimeout and i_strTargetPC are a timeout and pc name respectively.

    When you run this code, what happens is the application window hangs up.
    When you try to move the form, you get trailers and white smears.

    I think whats going on is the Set objPingExec... line is waiting for ping to run to completion.

    What I'd like to do is NOT have my program hang up when it pings a PC.

    Anyone know how I can do that?

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Waiting on ping

    You could try using my Ping Class. It is pretty robust.

    http://www.vbforums.com/showthread.php?t=395955
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width