Check Internet Connection in HTA via Ping

email me

‘Check Internet Connection
on error resume next
strURL = “”
ConnectionTest = WSHShell.Run(“cmd /c ping -n 2 ” & strURL, 0, True)
‘If ConnectionTest = 0 then msgbox “You are connected!”
If ConnectionTest = 1 then
msgbox “This computer is not connected to the network. Please check your connection and try again.”
end if

* remember to instantiate the WSHShell.Run object…