Editing the HOSTS file

Home Forums Windows Editing the HOSTS file

This topic contains 3 replies, has 2 voices, and was last updated by  HotDawg 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6407

    HotDawg
    Participant

    I run Windows 7 (Pro version).

    From time-to-time I have edited the HOSTS file to block access to bad sites, or maybe add locations on my LAN. Never a problem.

    Now I can’t. Somehow Microsoft has blocked my ability to write to that file. Using the command processor I find no attributes set that would prevent it.

    I appreciate this is a file that might be modified by malware. Is my AVG involved? Or are there permissions buried somewhere I need to change?

    #6414
    Nick Francesco
    Nick Francesco
    Keymaster

    Did you run your text editor as Admin? Also, is the read-only bit set? (hint: set it back ON after you edit the file!)

    #6415

    HotDawg
    Participant

    I will have to check on running notepad as administrator. I thought I did. Bringing up the command processor as administrator and running the attrib command does not show any flags (except the archive bit) set.

    What I ended up doing was booting up Linux and using it to edit the file. That worked — but as you know, Linux has a different idea about the end-of-line characters. Now in Windows the file lists out in one long line. So, I’m not sure if that is right.

    #6416

    HotDawg
    Participant

    Update:

    Running notepad as administrator did solve the problem!!

    Many thanks, Nick, for your help.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.