Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have tried to edit the file

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

but Windows always says that the file is in use.

share|improve this question
add comment

3 Answers

up vote 3 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".

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

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

share|improve this answer
add comment

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

share|improve this answer
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.