2

I am trying to edit my host file under

C:\Windows\System32\drivers\etc

But I keep getting the message

The process cannot access the file because it is being used by another process.

My PC has been restarted a few times, even tried full shut down and searched through possible programs that might be using it.

I found a way to edit the file with the command prompt, but still gave the same message?

Hope someone can help!

6
  • Are you opening this file with the editor (that is notepad) opened with admin privileges?
    – jhamu
    Jun 9, 2016 at 21:26
  • yes, tried with notepad and Aptana Studios 3, both right clicked and opened with Admin priveges. I also tried copying the content of the hosts file and save/replace the original one, got the same message, but when I save with a different name, it saves Jun 9, 2016 at 21:28
  • 1
    You may be able to edit in safe mode; otherwise, you'll need to boot up an alternative operating system from an external disc.
    – AFH
    Jun 9, 2016 at 21:31
  • 1
    You can try to find out what is locking hosts by starting process explorer (from msdn) with admin privilege and searching for the file name (that is "hosts") .technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    – jhamu
    Jun 9, 2016 at 21:39
  • I was able to edit and save in safemode, so Thanx AFH, you can post as a answer Jun 9, 2016 at 21:40

3 Answers 3

1

As stated in a comment in the question by AFH -

You may be able to edit in safe mode

I was able to log into windows 10 safe mode by following these steps.

I could edit and save the file without the popup stopping me

0

Easiest way to do this is, Copy hosts file to desktop edit it and then copy it back to the original location and replace the original file.

1
  • I could not do this, because it always said the file is in use, so I cannot replace the file Jun 13, 2016 at 11:05
0

Turning off webroot secure fixed the problem for me. If you're not using webroot secure try turning off any antivirus/malware/spyware apps you are running temporarily.

An easy way to see what process is using it, try moving the host file to the desktop and it will tell you.

1
  • Awesome this worked for me. Just turned off real time shield in webroot then I was able to save.
    – Natdrip
    Aug 25, 2018 at 21:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .