I am running Windows 7 Home Edition on my laptop.

I also have an instance of Apache Server running and am trying to create a virtual directory. I have updated apache's vhost-httpd file and now need to update C:\Windows\System32\drivers\etc\hosts. But I don't have permissions.

How do I get permission for this?

link|improve this question
feedback

2 Answers

up vote 3 down vote accepted

If you are editing the hosts file, you'll need to do two things.

Make sure your account is an admin account. If it is the only account on your computer, then it will 99% likely be an admin account.

open the start menu and type notepad c:\windows\system32\drivers\etc\hosts then hit ctrl shift Enter. This should raise a UAC prompt. If it didn't, do it again.

That should run Notepad elevated and allow you to edit the hosts file. Exit and save.

link|improve this answer
you so saved me, thanks for your help – chris Dec 29 '11 at 9:04
Surprisingly, I couldn't find a previous question about editing the host file. . . – surfasb Dec 29 '11 at 9:34
feedback

One thing to remember about Windows 7 is that any file you want to edit in the C:\Windows folder, will require administrative permissions. Another good way is to open Windows Explorer with admin privileges (search for it in the Start Menu, right-click -> Run as administrator). This way, all files you open from Windows Explorer are opened with admin rights and can be edited and saved back.

Whatever you do, do not disable UAC. Even though it can annoy you at times, it is an important security feature which makes Windows 7 safer than Windows XP ever was.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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