View Single Post
  #15  
Old April 6th 18, 12:43 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 23,
Auric__ writes:
Char Jackson wrote:

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.


If you have Sysinternals Process Explorer, search for "hosts" (Ctrl+F)
and
it'll show you what has it open. You can close the handle from the
lower main
pane (Ctrl+L). (You may need to "Show Details for All Processes".)

(Any program with similar capabilities should be able to do this.)

Otherwise, try rebooting to safe mode and editing there.

Thanks, you and Ed. Excellent idea. Then I found my Process Explorer
won't work! I've extracted it again from the .zip file I downloaded (and
yes, it _did_ work then!); I run it, I get the UAC popup, I click Run in
that, and - nothing happens. And there's nothing beginning with P in
Task Manager other than Panorama.


Try running it as Administrator.
If that doesn't work, look here;
https://support.microsoft.com/en-us/...does-not-start

If it's still unfixed after that, then do a comprehensive check of what
else is shut out; and then let us know.

Ed

Ads