Windows7 will not let me edit the hosts file and save it

Anonymous
2010-04-16T18:31:57+00:00

Windows7 will not let me edit the hosts file and save it. What must I do in order to save the edited host file?

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-04-16T18:47:57+00:00

It's a built-in safety feature.  There is an easy workaround.  ClickStart ->All Programs -> Accessories.  Right-clickNotepad, and then click Run as administrator.  If you are prompted for an administrator password or for a confirmation, type the password, or clickAllow or Yes.

Open the Hosts file (from the notepad you just opened) , make your changes, and then click File ->Save

Barbara

Was this answer helpful?

200+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2010-04-16T20:43:01+00:00

You need to either take ownership of the file (Right click the hosts file, Security tab, and give yourself full rights), or open Notepad as Administrator and open, edit and save your hosts file from there. It's designed that way so some rogue malware can't come in and change that.

Was this answer helpful?

70+ people found this answer helpful.
0 comments No comments

66 additional answers

Sort by: Oldest
  1. Anonymous
    2015-04-17T12:47:43+00:00

    Thanks to all for sharing options here.

    I was experiencing all of the aforementioned issues while attempting to manipulate the hosts file. This is definitely a pesky anti virus issue. I use Avira and [temporarily] switched off its 'Real-time Protection', and was able to rename hosts to hostsOrig and then rename the host file with the changes I had made to it (hostsi.txt) to hosts.

    Didn't try opening Notepad as Administrator as, although I'd done that earlier - and I'm sure it will work the same - I already had created a .txt hostsi file. 

    And yes, I did remember to switch back on the 'Real-time Protection' in Avira.

    Cheers ND

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2015-06-09T05:00:22+00:00

    Remove Read-Only from file Properties.

    Then Try it Again.  i am sure it will work for u.

    Was this answer helpful?

    0 comments No comments