How can I change hosts file ? It won't let me

Discussion in 'Windows 7 Help and Support' started by d8000, Mar 31, 2011.

  1. d8000

    d8000 New Member

    Joined:
    Mar 31, 2011
    Messages:
    38
    Likes Received:
    0
    I didn't find a hosts file in the SysWOW64 folder, but I did find one in the "usual" place windows\system32\drivers\etc and I see it's NOT set to read-only. But when I try to edit it with notepad and save as "all files" rather than .txt (to avoid notepad giving it a .txt extension) it fails to save. It tells me I don't have permission (even though my user account is an administrator).

    Is there some reg trick to allow me to change it? I've got a bunch of mappings I want to put in there.
     
    #1 d8000, Mar 31, 2011
    Last edited: Mar 31, 2011
  2. Joe S

    Joe S Excellent Member

    Joined:
    Jan 12, 2009
    Messages:
    3,785
    Likes Received:
    113
  3. Saltgrass

    Saltgrass Excellent Member
    Microsoft Community Contributor

    Joined:
    Oct 16, 2009
    Messages:
    15,157
    Likes Received:
    393
    I hate to ask, but Windows has protected this file. Is there a huge need on your part to alter it?
     
  4. d8000

    d8000 New Member

    Joined:
    Mar 31, 2011
    Messages:
    38
    Likes Received:
    0
    Thanks, that looks useful, bookmarked it for the future.

    Fairly huge. Larger than Windows need to protect it :)

    The answer was annoyingly dumb. Just copy the file to another location, edit it there, and then copy it back. Then you're only presented with a typical administrator privilege prompt, to which you can click "continue" and it's done.
     
  5. Joe S

    Joe S Excellent Member

    Joined:
    Jan 12, 2009
    Messages:
    3,785
    Likes Received:
    113
    The Host Toggle is the simplest you can load and edit with it. It doesn't actually install like the other hosts utilities.
    Joe
     
  6. pbcopter

    pbcopter Honorable Member

    Joined:
    Jan 15, 2009
    Messages:
    226
    Likes Received:
    12
    If you open Notepad at an elevated level (right click the Notepad icon and select "Run as Administrator"), you can edit the file where it is.
     
  7. d8000

    d8000 New Member

    Joined:
    Mar 31, 2011
    Messages:
    38
    Likes Received:
    0
    Now that is perfection. Awesome tip. Cheers :eek: :razz: :applaud:
     

Share This Page

Loading...