Ping a site that is usually online.
VB Code:
Option Explicit Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL As Long = 1 Private Const SW_HIDE As Long = 0 Private Sub Command1_Click() ShellExecute Me.hwnd, "Open", "C:\Windows\System32\CMD.exe", " /c ping [url]www.google.com[/url] >> D:\ping.txt", "D:\", SW_SHOWNORMAL Shell "notepad D:\ping.txt", SW_SHOWNORMAL End Sub




Reply With Quote