Can't open/edit hosts file in Windows 7

  • famous_roy 18 Jun 2010 10:01:28 4,126 posts
    Seen 2 years ago
    Registered 15 years ago
    Now before I get 'F'd up the A' for a problem that seems obvious.. I've tried everything.

    Tried making myself an admin through the cmd dialogue. Right clicked on notepad > run as administrator > drilled down to hosts file, no joy. I just keep getting the 'sample' hosts file every time I attempt to open.

    This is driving me coco bananas, any ideas?
  • Normski 18 Jun 2010 10:10:36 27 posts
    Seen 8 years ago
    Registered 15 years ago
    Are you sure it's not being moved to the Virtual Store when you save it? So every time you reopen it from it's original location, you're seeing the same thing?
  • BadDevotions 18 Jun 2010 10:13:26 554 posts
    Seen 3 years ago
    Registered 19 years ago
    i remember having a similar issue - turned out it had been protected. I can now open, edit and save it. i *think* all i did was disable the read-only flag.

    it should be here, yar? C:\Windows\System32\drivers\etc
  • famous_roy 18 Jun 2010 15:31:32 4,126 posts
    Seen 2 years ago
    Registered 15 years ago
    Bad Devotions wrote:
    i remember having a similar issue - turned out it had been protected. I can now open, edit and save it. i *think* all i did was disable the read-only flag.

    it should be here, yar? C:\Windows\System32\drivers\etc

    Yep that's the right place, how did you disable the read only business?

    @Normski I can't even open the file properly, it always gives me the same file about how 'this is an example hosts file'.
  • BCrowe 18 Jun 2010 15:48:56 543 posts
    Seen 2 days ago
    Registered 14 years ago
    My hosts file says it's a sample file too, but it still works as the real thing. It's just a comment at the top, it doesn't mean anything. Unless the file you're opening is called something other than just "hosts".
    You should be able to remove the read-only property by right clicking the file, selecting "Properties" and unselecting "Read-only".
  • famous_roy 18 Jun 2010 16:36:43 4,126 posts
    Seen 2 years ago
    Registered 15 years ago
    Awesome chaps, cheers for this. I'll give it a whizz when I get home tonight :)
  • Deleted user 18 June 2010 20:22:37
    Alternatively, copy it to your Desktop (or somewhere else that isn't under admin writes), make your changes, and copy and paste the file back to drivers/etc
  • pacrifice 1 Jan 2011 16:27:07 5,247 posts
    Seen 1 day ago
    Registered 16 years ago
    Someone please please please help me ='(

    i need to go into a host file to remove a line

    I found the file, know how to open it, is it really just a simple case of highlighting the line, delte, and save...?
  • pacrifice 1 Jan 2011 16:52:45 5,247 posts
    Seen 1 day ago
    Registered 16 years ago
    omg yes i did it, thanx anyway =)
  • mal 1 Jan 2011 17:02:09 29,326 posts
    Seen 2 years ago
    Registered 19 years ago
    If it's a hosts file then yes, the format is that simple.
Log in or register to reply

Sometimes posts may contain links to online retail stores. If you click on one and make a purchase we may receive a small commission. For more information, go here.