Solved

Internet Connection Util

Posted on 2016-10-14
8
68 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 90

Expert Comment

by:John Hurst
Comment Utility
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 47

Author Comment

by:dbrunton
Comment Utility
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 90

Expert Comment

by:John Hurst
Comment Utility
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
 
LVL 51

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 total points
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 91

Expert Comment

by:nobus
Comment Utility
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 68

Expert Comment

by:Qlemo
Comment Utility
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 47

Author Closing Comment

by:dbrunton
Comment Utility
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 51

Expert Comment

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now