How can I overwrite the hosts file in Windows 7?

3

I can't overwrite my hosts file in Windows 7.

I open Notepad as an administrator and open the hosts file (C:\Windows\System32\drivers\etc) as an administrator.

96.44.181.245 www.Google.com

has been put in there along with a host of others. Whenever I remove it and try to overwrite the file, it will not let me. It says access denied even though I am doing it as an administrator.

Any ideas?

ben950

Posted 2011-03-08T19:32:12.247

Reputation: 722

Answers

3

If you're logged in as an administrative user, that's not enough. You will need to right click on the Notepad icon and select Run as administrator.

Paused until further notice.

Posted 2011-03-08T19:32:12.247

Reputation: 86 075

1that didnt work but thanks. in the end iu added the current user with full access right in security then renamed the file .bak recreated the original hosts file and saved it with out any extension then it started to work – ben950 – 2011-03-08T20:47:06.503

1

You can right-click on the hosts file and click Propeties, then Security. Add your username to the security group and give yourself read/write permissions. Click Apply and you will be able to save your new settings.

But when you finish I advise you to remove yourself from the security group to prevent any unwanted changes done by others.

user199140

Posted 2011-03-08T19:32:12.247

Reputation: 11