Guest User

internet-fix.bat

a guest
Sep 22nd, 2011
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2. REM Disable proxy http://support.microsoft.com/kb/819961
  3. ECHO Resetting Winsock
  4. netsh winsock reset >nul 2>&1
  5. ECHO.
  6. ECHO Flushing Winsock Catalog
  7. netsh winsock reset catalog >nul 2>&1
  8. ECHO.
  9. ECHO Resetting TCP/IP
  10. netsh interface ip reset %temp%\reset.txt >nul 2>&1
  11. ECHO.
  12. ECHO Resetting All Interfaces
  13. netsh interface reset all >nul 2>&1
  14. ECHO.
  15. ECHO Resetting Firewall
  16. netsh firewall reset >nul 2>&1
  17. ECHO.
  18. REM ##find the line beginning with "User-friendly Name:" and set the value behind the colon to %%B
  19. FOR /F "tokens=1* delims=:" %%A IN ('netsh int ip show interface ^| findstr /B /I /c:"User-friendly Name:"') DO (
  20.   REM ##trim the incipient spaces of %%B and set the value to %%C
  21.   FOR /F "tokens=*" %%C IN ("%%B") DO (
  22.     ECHO Setting Interface "%%C" IP to DHCP
  23.     netsh int ip set address name = "%%C" source = dhcp >nul 2>&1
  24.     ECHO Setting Interface "%%C" DNS to DHCP
  25.     netsh int ip set dns name = "%%C" source = dhcp >nul 2>&1
  26.     ECHO Setting Interface "%%C" WINS to DHCP
  27.     netsh int ip set wins name = "%%C" source = dhcp >nul 2>&1
  28.     ECHO.
  29.   )
  30. )
  31. ECHO Flushing DNS
  32. ipconfig /flushdns >nul 2>&1
  33. ECHO Re-Registering DNS
  34. ipconfig /registerdns >nul 2>&1
  35. ECHO Resetting Netbios Tables
  36. nbtstat -RR
  37. ECHO Disabling proxy
  38. ver | find "XP" > nul
  39. if %ERRORLEVEL% == 0 (
  40. proxycfg -d
  41. )
  42. else (
  43. netsh winhttp import proxy ie
  44. netsh winhttp reset proxy
  45. )
Advertisement
Add Comment
Please, Sign In to add comment