Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.