[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • 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
 
John HurstBusiness 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
 
John HurstBusiness 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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
 
John HurstBusiness 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
 
John HurstBusiness 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
 
John HurstBusiness Consultant (Owner)Commented:
Thank you. I was pleased to help and hope it is alll working for you. ... Thinkpads_User
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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