인터넷이 작동 중이고 연결 여부를 추적해야 하는 경우 가장 간단한 방법은 Windows 10의 시스템 트레이에 있는 WiFi 기호를 주시하는 것입니다. 인터넷 연결이 끊어지면, 노란색 느낌표가 WiFi 기호에 나타납니다. 웹사이트를 ping할 수도 있습니다. 시스템 트레이를 주시할 수 없고 핑이 지루하게 느껴진다면 간단한 스크립트를 사용하여 Windows 10에서 오디오 인터넷 연결 경고를 설정할 수 있습니다.
스포일러 경고: 아래로 스크롤하여 이 기사 끝에 있는 비디오 자습서를 시청하십시오.
인터넷 연결 경고
이 스크립트는 원래 수퍼유저 Fabby가 작성했으며 VMMF에서 개선했습니다. 스크립트를 사용하려면 Win32용 GNU 유틸리티. 압축을 풀고 다음 폴더에서 Sleep.exe라는 EXE를 찾습니다.
UnxUtilsusrlocalwbin
이것은 검사 사이에 대기 시간을 추가하는 데 사용됩니다. 이 EXE는 스크립트를 저장한 동일한 폴더에 있어야 합니다. 다른건 필요없으니 지우시면 됩니다.
메모장을 열고 다음을 붙여넣습니다. CMD 확장자로 저장하고 파일을 실행합니다. sound.vbs 파일은 스크립트에 의해 생성되므로 걱정하지 마십시오.
@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
그게 다야. 명령 프롬프트 창이 열려 있는 상태로 인터넷 연결 상태를 확인합니다. 변경되면 Off 소리가 들립니다.