Server Fault is a question and answer site for system and network administrators. 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 want to modify a file in vista ( C:\Windows\System32\drivers\etc\hosts ) but I can't write it to disk.

Similar thing happen with other files that are not under my user directory. C:\Users\me

I am in the administrator group.

What is needed to edit these files?

share|improve this question
up vote 6 down vote accepted

With UAC turned on, you're not running as an administrator normally. That's why you can't edit it. The simplest thing to do is to right-mouse click notepad and choose "run as administrator". You'll be prompted with a UAC prompt. You should then be able to edit and save the file.

share|improve this answer
Thanks Knox... I just had this scenario perplex me in Win7 when trying to change that file. I decided to let UAC do its job, and I am running as non-admin in Win7. It didn't occur to me. I would have expected a UAC prompt, but none came. Now I know; thanks. – p.campbell May 26 '09 at 13:45

Your Answer


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.