This is what I use, not tested with Vista though.
Code:
Public Function ComputerIsOnline(ByVal strComputerName As String) As Boolean
    On Error GoTo ErrorHandler
    
    Dim strResult   As String
    Dim ShellX      As String
    Dim FileNum     As Integer
    Dim lPid        As Long
    Dim lHnd        As Long
    Dim lRet        As Long
    
    'DoEvents
    ShellX = Shell("command.com /c ping -n 2 " & strComputerName & " > log.txt", vbHide)
    lPid = ShellX
    If lPid <> 0 Then
        lHnd = OpenProcess(SYNCHRONIZE, 0, lPid)
        If lHnd <> 0 Then
            lRet = WaitForSingleObject(lHnd, INFINITE)
            CloseHandle (lHnd)
        End If
        FileNum = FreeFile
        Open "log.txt" For Input As #FileNum
        strResult = Input(LOF(1), 1)
        Close #FileNum
        ComputerIsOnline = (InStr(strResult, "Lost = 0") > 0)
    End If
    Exit Function
ErrorHandler:
    ComputerIsOnline = False
    Exit Function
End Function