Fix Hosts File (v1.0)

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.00 out of 5)
Loading ... Loading ...

Summary: This batch file will make it a bit easier to fix your ‘hosts’ file.

Requirements:

  • Windows 2000 / XP / Vista

Code:

@echo off
cls
echo Fix the Host File
echo By Blake Johnson
echo http://www.blakeanthonyjohnson.com
echo.
echo.
echo Are you blocked from a specific web site?  Find the domain name and
echo if it is in the list, remove it.  Problem should then be solved.
echo. 
pause
echo.
echo Remove Read-only and System attributes from the Hosts file...
attrib -s -r %windir%\system32\drivers\etc\hosts
echo Done.
echo.
echo Open the Hosts file for editing...
notepad %windir%\system32\drivers\etc\hosts
echo Done.
echo.
echo Apply the Read-only and System attributes to the Hosts file...
attrib +s +r %windir%\system32\drivers\etc\hosts
echo Done.
echo.
echo.
echo Assuming you made the changes you intended to make, you should
echo be good to go.
echo.
pause

0 Responses to “Fix Hosts File (v1.0)”


  1. No Comments

Leave a Reply





User Agent: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
Character Encoding: UTF-8
Generated: 09/07/2010 23:21:55 UTC
Rendering Time: 0.758 seconds.