Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- REM Disable proxy http://support.microsoft.com/kb/819961
- ECHO Resetting Winsock
- netsh winsock reset >nul 2>&1
- ECHO.
- ECHO Flushing Winsock Catalog
- netsh winsock reset catalog >nul 2>&1
- ECHO.
- ECHO Resetting TCP/IP
- netsh interface ip reset %temp%\reset.txt >nul 2>&1
- ECHO.
- ECHO Resetting All Interfaces
- netsh interface reset all >nul 2>&1
- ECHO.
- ECHO Resetting Firewall
- netsh firewall reset >nul 2>&1
- ECHO.
- REM ##find the line beginning with "User-friendly Name:" and set the value behind the colon to %%B
- FOR /F "tokens=1* delims=:" %%A IN ('netsh int ip show interface ^| findstr /B /I /c:"User-friendly Name:"') DO (
- REM ##trim the incipient spaces of %%B and set the value to %%C
- FOR /F "tokens=*" %%C IN ("%%B") DO (
- ECHO Setting Interface "%%C" IP to DHCP
- netsh int ip set address name = "%%C" source = dhcp >nul 2>&1
- ECHO Setting Interface "%%C" DNS to DHCP
- netsh int ip set dns name = "%%C" source = dhcp >nul 2>&1
- ECHO Setting Interface "%%C" WINS to DHCP
- netsh int ip set wins name = "%%C" source = dhcp >nul 2>&1
- ECHO.
- )
- )
- ECHO Flushing DNS
- ipconfig /flushdns >nul 2>&1
- ECHO Re-Registering DNS
- ipconfig /registerdns >nul 2>&1
- ECHO Resetting Netbios Tables
- nbtstat -RR
- ECHO Disabling proxy
- ver | find "XP" > nul
- if %ERRORLEVEL% == 0 (
- proxycfg -d
- )
- else (
- netsh winhttp import proxy ie
- netsh winhttp reset proxy
- )
Advertisement
Add Comment
Please, Sign In to add comment