Reset Internet settings with simple .bat file
Welcome, Guest. Please login or register. Did you miss your activation email?


Britec Computer Tech Help Support Forums  « Software Support « Programming or Coding « Reset Internet settings with simple .bat file
Pages: [1]
  Print  
Author Topic: Reset Internet settings with simple .bat file  (Read 549 times)
Britec
Administrator
Hero Member
*****
Posts: 3496



View Profile
« on: December 09, 2011, 03:03:32 PM »

Reset Internet settings with simple .bat file

Code:
@Echo on
pushd\windows\system32\drivers\etc
attrib -h -s -r hosts
echo 127.0.0.1 localhost>HOSTS
attrib +r +h +s hosts
popd
ipconfig /release
ipconfig /renew
ipconfig /flushdns
netsh winsock reset all
netsh int ip reset all
echo
cls
cls
echo Script complete. System will now shut down. Close or save any open files before continuing.
pause
shutdown -r -t 1
del %0

Save as flush.bat to your desktop.
Double click on the flush.bat file to run it. Vista and Windows 7... right click the .bat file and choose to run as Administrator. Your computer will reboot itself.

Important: The bat file will be deleted after reboot. if you wish to keep the file remove the del %0 code
« Last Edit: December 09, 2011, 03:05:11 PM by Britec » Logged



Highlinder1968
Newbie
*
Posts: 30


View Profile
« Reply #1 on: December 09, 2011, 04:47:27 PM »

Nice bit of scripting there Brian , well worth a keep just in-case have to do the above job on a customers pc.
Logged
Britec
Administrator
Hero Member
*****
Posts: 3496



View Profile
« Reply #2 on: December 11, 2011, 11:33:05 AM »

Yeah its good to run after malware infection problems.
Logged



Highlinder1968
Newbie
*
Posts: 30


View Profile
« Reply #3 on: December 13, 2011, 10:03:23 AM »

Yeah seen the video up for this , also added it to what I can use when fixing things up.
Logged
Pages: [1]
  Print  
 
Jump to: