View Single Post
  #5  
Old April 5th 18, 10:13 PM posted to alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default can't edit hosts file?

J. P. Gilliver (John) wrote:
In message , Char Jackson
writes:
On Thu, 5 Apr 2018 20:04:01 +0100, "J. P. Gilliver (John)"
wrote:

I'm sure I have edited it since moving to W7! But now when I try, I am
told it is in use: "The process cannot access the file because it is
being used by another process." (The process being plain original
NotePad.) If I try to delete it (having made a copy of course!), I get
"The action can't be completed because the file is open in System".

I've just done a restart, and tried again before opening anything I'd
have thought would be using it - no change. Though as I said, I'm sure
I've edited it before, and that _wouldn't_ have been under those
circumstances.

What's using it? "System" isn't very informative - could be a user
rather than a process.


Some AV programs will lock the hosts file to prevent malicious editing.
Also, I believe you have to run your editor, Notepad in this case, as
Administrator. If you're already aware of those restrictions, then I'm
not sure what the deal is.

I've tried this - running Notepad as administrator, and turning off AVG.
I still get "...cannot access the file because it is being used by
another process."


Try using Process Explorer to see what's got it tied up; Find tab, Find
Handle or DLL.
In Windows 7 the hosts file is;
C:\Windows\System32\drivers\etc\hosts

Ed

Ads