I have tried to edit the file

C:\Windows\System32\drivers\etc\hosts

but Windows always says that the file is in use.

link|improve this question

65% accept rate
feedback

3 Answers

up vote 2 down vote accepted

It might be done by running notepad.exe as administrator. The way I do it is by copying the hosts-file into "Copy of hosts", and making the changes in that file. Then I delete the hosts-file (which it will allow for some reason), and rename the copied file to "hosts".

link|improve this answer
BRILLIANT, THIS WORKED!!! Thanks! :) – Zubair Jan 15 '11 at 16:26
@Zubair so accept this answer ;) – bluish Apr 20 '11 at 7:04
sorry, I hadnt been to super user for a while :) – Zubair Apr 24 '11 at 12:21
feedback

The easiest way is to run any text editor you use as an administrator and then open the file with it.

link|improve this answer
feedback

Open notepad as an administrator, right click on notepad.exe and select "run as administrator", then use File > Open, navigate to the hosts file.

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.