๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.os.windows-10
Article #225

Re: Tip: full network reset

#225
From: Maria Sophia
Date: Mon, 12 Oct 2026 17:35
70 lines
3150 bytes
T wrote:
> ยกAy, caramba!

That connection reset script started with this that I got off this ng.

  :: connectivity_test.bat
  @echo off
  setlocal enabledelayedexpansion
  
  echo === Connectivity test harness ===
  
  REM --- Parse IP (Wi-Fi only) ---
  set "ip="
  for /f "tokens=2 delims=:" %%i in ('ipconfig ^| findstr /C:"Wi-Fi"
/C:"IPv4 Address"') do set "ip=%%i"
  set "ip=%ip: =%"
  echo [RESULT] ip="%ip%"
  
  REM --- Parse Gateway (Wi-Fi only) ---
  set "gw="
  set "inwifi="
  for /f "usebackq delims=" %%L in (`ipconfig`) do (
      if /i "%%L"=="Wireless LAN adapter Wi-Fi:" set "inwifi=1"
      if defined inwifi (
          for /f "tokens=1,* delims=:" %%A in ("%%L") do (
              if /i "%%A"=="   Default Gateway . . . . . . . . . " set
"gw=%%B"
          )
      )
      echo %%L | findstr /R /C:"^[A-Za-z].*adapter" >nul && if defined
inwifi if not "%%L"=="Wireless LAN adapter Wi-Fi:" set "inwifi="
  )
  set "gw=%gw: =%"
  echo [RESULT] gw="%gw%"
  
  REM --- Ping Gateway ---
  if not defined gw (
      echo No gateway found.
      goto End
  )
  ping -n 1 %gw%
  if errorlevel 1 (
      echo Gateway %gw% unreachable.
  ) else (
      echo Gateway %gw% reachable.
  )
  
  REM --- Ping Internet ---
  ping -n 1 8.8.8.8
  if errorlevel 1 (
      echo Internet unreachable.
  ) else (
      echo Internet reachable.
  )
  
  REM --- Ping DNS ---
  ping -n 1 www.microsoft.com
  if errorlevel 1 (
      echo DNS resolution failed.
  ) else (
      echo DNS resolution succeeded.
  )
  
  :End
  echo === Test complete ===
  pause
  
  :: end of connectivity_test.bat
-- 
On Usenet, we learn from others as readily as we teach them ourselves.
Technical Details
Message-ID: <11aj5pi$23r0$2@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-12.vpngate.v4.open.ad.jp!not-for-mail
References: <11ad9na$1mp2o$1@dont-email.me> <11adtmo$q4e$1@nnrp.usenet.blueworldhosting.com> <11afipr$2fq2n$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-12.vpngate.v4.open.ad.jp!not-for-mail
From: Maria Sophia <mariasophia@comprehension.com>
Newsgroups: alt.comp.os.windows-11,alt.comp.os.windows-10
Subject: Re: Tip: full network reset
Date: Mon, 12 Oct 2026 10:35:50 -0700
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <11aj5pi$23r0$2@nnrp.usenet.blueworldhosting.com>
References: <11ad9na$1mp2o$1@dont-email.me> <11adtmo$q4e$1@nnrp.usenet.blueworldhosting.com> <11afipr$2fq2n$1@dont-email.me>
Reply-To: pusvul@getTjewytR4so+mqe2.invalid
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 12 Oct 2026 17:35:48 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="l//KxG3Ge2LojWvwJg0Igv8F0ChK8RUC9RtOxMPUo3U"; posting-host="Dg8vEhE1wZBDJOwXTSEKAoRS4PU2oXroEpl9dza6STY";
	logging-data="69472"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Mojibake 1p3
Cancel-Lock: sha1:udQy8nGk9fiX1Znhc+H9stuUsOE= sha256:DtUZyjkx5ehMLgfMMNdZDUpYkR6tbbLZBDUH3AGcZYg=
	sha1:IFNeL4fN6t1JFnhKMol/T4ctdGQ= sha256:6U58FFM0VWUWeFc/j+soWBCX7kK+0Nm+q7/rp42BJeA=
Content-Language: en-GB