Solved

Internet Connection Util

Posted on 2016-10-14
8
110 Views
Last Modified: 2016-10-17
I'm looking for a util that can determine if a computer has a connection to the Internet.  Computer is a Windows 10 system.

Must be simple to operate and understand.  What I have in mind is a simple click button to launch the application and a message that appears to say "Internet connected" or "Internet down".  That is the idea of the simplicity I want in this util.  Perhaps there is a batch file that could do the job?

Anyone know if there is a util around like this?
0
Comment
Question by:dbrunton
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 94

Expert Comment

by:John Hurst
ID: 41844247
There is a Wired or Wireless connection ICON in Windows 10. Hover over it. It will tell you whether you have Internet Access or not. If you have a connection (IP address) and no Internet, it will tell you precisely that.

It is there to use and it works.
0
 
LVL 48

Author Comment

by:dbrunton
ID: 41844262
Yes, but this is for a relative for whom the task of hovering the mouse over an icon and reading the result would be too difficult.  The computer for her is a complex beast and she uses it only for FreeCell and Skype.

Getting her to click on a button is far, far easier to do.
0
 
LVL 94

Expert Comment

by:John Hurst
ID: 41844277
So then write a little script to PING an external address forever. If it breaks there would be no internet. I think that will work.

I am always able to get people to put their mouse over a distinct icon but I recognize that not everyone could do this
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 53

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 total points
ID: 41844321
I had this same issue a while ago. Needed a solution for an AutoHotkey script and found this thread at the AHK forum:
https://autohotkey.com/boards/viewtopic.php?f=5&t=20323

The crux of it is this function:

InternetConnection()
{
  WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  WebRequest.Open("GET", "http://www.timeapi.org/utc/now")
  WebRequest.Send()
  Return (SubStr(WebRequest.ResponseText, 5, 1) = "-")
}

Open in new window

I'm sure you can convert that to whatever scripting language you prefer.

> What I have in mind is a simple click button to launch the application and a message that appears to say "Internet connected" or "Internet down".

The following call to that function would do what you want:

If InternetConnection()
  MsgBox,Internet connected
Else
  MsgBox,Internet down
ExitApp

Open in new window


Again, convert that to whatever scripting language you prefer. Considering AutoHotkey, if you want to run the script on systems without AutoHotkey installed, simply compile it into a stand-alone EXE file (using the AutoHotkey compiler on your dev machine, which is part of a standard AutoHotkey install). I've run those EXE files on all versions of Windows from XP to W10 (and everything in between), both 32-bit and 64-bit. For "a simple click button to launch", simply create a shortcut to the EXE file and put it on the desktop, place it in the Start menu, pin it to the taskbar, etc.  Regards, Joe

Regards, Joe
0
 
LVL 92

Expert Comment

by:nobus
ID: 41844699
i usually click on the big E for internet explorer
if it says no connection - or does not display  the start page, i know i have no internet
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 41845931
The whole can only work by testing one or a few Internet locations. A batch file like
@echo off
>nul ( ping -n 1 1.1.1.1 || ping -n 1 8.8.8.8) && echo Internet works || echo The Internet has been deleted!
pause

Open in new window

could work (testing two Google DNS servers).
0
 
LVL 48

Author Closing Comment

by:dbrunton
ID: 41846028
This works beautifully.  Just finished testing on the user's Windows 10 machine.  Now I have a nice easy method to diagnose the Internet connection over the phone line.

Thanks Joe.
0
 
LVL 53

Expert Comment

by:Joe Winograd, EE MVE
ID: 41846755
You're welcome. I'm glad that works for you. Cheers, Joe
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Troubleshooting common task sequence error codes
An article on effective troubleshooting
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question