Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.