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?

link|improve this question

feedback

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.

link|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
feedback

Your Answer

 
or
required, but never shown

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