- - Cómo configurar alertas de conectividad a Internet en Windows 10

Cómo configurar alertas de conectividad a Internet en Windows 10

Si su Internet está actuando y necesitarealice un seguimiento cuando tenga una conexión o no, la forma más sencilla de hacerlo es vigilar el símbolo de WiFi en la bandeja del sistema en Windows 10. Cuando pierde la conectividad a Internet, aparece un signo de exclamación amarillo en el símbolo de WiFi. También puede hacer ping a un sitio web. Si no puede vigilar la bandeja del sistema y hacer ping parece ser tedioso para usted, puede configurar alertas de conectividad de audio a Internet en Windows 10 con un simple script.

ALERTA DE SPOILER: Desplácese hacia abajo y vea el video tutorial al final de este artículo.

Alertas de conectividad a internet

Este guión fue escrito originalmente por SuperusuarioFabby, y mejorado por VMMF. El script requiere que descargue una utilidad gratuita llamada GNU utilities para Win32. Extraiga y busque dentro de la siguiente carpeta un EXE llamado Sleep.exe.

UnxUtilsusrlocalwbin

Esto se usará para agregar un tiempo de espera entre los cheques. Este EXE debe estar en la misma carpeta en la que guarda el script. No necesita nada más, así que siéntase libre de eliminarlo.

Abra el Bloc de notas y pegue lo siguiente en él. Guárdelo con una extensión CMD y ejecute el archivo. El script creará el archivo sound.vbs, así que no se preocupe.

@ECHO OFF
:whileNoInternet
set "host=8.8.8.8"
::check if internet is working
PING -n 1 -w 5000 "%host%" | findstr /r /c:"[0-9] *ms"
if %errorlevel% neq 0 (
::the internet is not working keep cheking until it does
echo No internet yet %TIME%
GOTO whileNoInternet
)
echo we gained internet
::the internet is working play internet ON song
@echo off
set "file=InternetON_GOGOGO.mp3"
( echo Set Sound = CreateObject("WMPlayer.OCX.7"^)
echo Sound.URL = "%file%"
echo Sound.Controls.play
echo do while Sound.currentmedia.duration = 0
echo wscript.sleep 100
echo loop
echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs
start /min sound.vbs
@ECHO OFF
:whileInternet
sleep.exe 5s
::check if internet is still working
PING -n 1 -w 1000 "%host%" | findstr /r /c:"[0-9] *ms"
if %errorlevel% == 0 (
::the internet is still working keep cheking until it does not
echo We have internet %TIME%
GOTO whileInternet
)
:: detect possible internet glitches (do not trust the first failure)
echo internet glitch detected
sleep.exe 10s
PING -n 1 -w 1000 "%host%" | findstr /r /c:"[0-9] *ms"
if %errorlevel% == 0 (
::the internet is still working keep cheking until it does not
echo We have internet %TIME%
GOTO whileInternet
)
:: if it failed twice in a row most likely internet is down
echo we lost internet
::the internet is not working anymore, play internet OFF song
@echo off
set "file=InternetHasFallen.mp3"
( echo Set Sound = CreateObject("WMPlayer.OCX.7"^)
echo Sound.URL = "%file%"
echo Sound.Controls.play
echo do while Sound.currentmedia.duration = 0
echo wscript.sleep 100
echo loop
echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs
start /min sound.vbs
::start monitoring if it comes back
GOTO whileNoInternet

Eso es todo lo que necesitas hacer. Una ventana de símbolo del sistema permanecerá abierta para verificar el estado de su conectividad a Internet. Si cambia, escuchará el sonido Off.

Comentarios