Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
1  
that 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 Mar 8 '11 at 20:47

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .