• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

Windows 7 Host file doesn't retain changes

On windows 7 pro I am attempting to make changes to the Host file in the hopes of blocking a site I don't want users to access, from this single PC.

I get the desired result when I do this then save the file however after a day or so when I go to check on the site & subsequently the Host file at:
C:\Windows\System32\drivers\etc
Its reverted to a default state with no entries.

The account I am using is an administrator but is not THE "Administrator" account that gets created when installing the OS.

Could there be a Windows File Protection thing going on here?
How can I get the entry I made to 'stick' permanently?
0
alexianit
Asked:
alexianit
1 Solution
 
JohnBusiness Consultant (Owner)Commented:
You can fix this easily. Type Notepad in the Start Menu. When it comes to the top of the search list, right clidk on it and select Run as Administrator. Now in Notepad, navigate to the Hosts file, edit it and change it. Save it and changes will be retained.  ... Thinkpads_User
0
 
JacobfwCommented:
Two items:

1) you must delete the original hosts file before you save a new one to the same location
2) as you indicate you need to be "Administrator"
0
 
JohnBusiness Consultant (Owner)Commented:
No, you do not need to delete the original hosts file. I edit them all the time simply by running the editor as administrator. I use Notepad. ... Thinkpads_User
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Dave BaldwinFixer of ProblemsCommented:
See if your "Anti-virus" or "Internet Security" is replacing the files with their saved copy every time you boot up.
0
 
JohnBusiness Consultant (Owner)Commented:
Antivirus (good A/V) does not impede editing the HOSTS file. One need only run the editor as Administrator. Works every time. .... Thinkpads_User
0
 
Dave BaldwinFixer of ProblemsCommented:
Symantec Endpoint will block changing the HOSTS file as will some others.  I can't find it at the moment but there is another product that simply rewrites some critical files on boot to prevent permanent 'unauthorized' changes.  So it is a possibility.
0
 
JohnBusiness Consultant (Owner)Commented:
I have SEP running on my own and my client machines and it doesn't get in the way.

HOSTS is protected and when you double click on it, Notepad (or whatever) is not smart enough to open as administrator, so you need to do it manually. But as I noted, it works every time that way.

... Thinkpads_User
0
 
jcimarronCommented:
alexianit--Well, you do not need to delete the existing HOSTS file to make changes, but when you do make changes and assuming you have opened HOSTS in Notepad as suggested, you need to click File|Save.  Now you have Saved the changes.  Just like any other writing in Notepad.
0
 
JohnBusiness Consultant (Owner)Commented:
Thank you. I was pleased to help and hope it is alll working for you. ... Thinkpads_User
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now