Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Internet Connection Util

Posted on 2016-10-14
8
Medium Priority
?
131 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 98

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 49

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 98

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 55

Accepted Solution

by:
Joe Winograd, EE MVE 2015&2016 earned 2000 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 93

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 71

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 49

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 55

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
I originally wrote this article to compare SARDU and YUMI, but have now added Easy2Boot, since that is the one I currently use and find the easiest to create and alter.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

704 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