Windows 8 Hosts File – How to Edit the Hosts File

hosts-fileprocess-explorerwindows 8

I'm trying to edit my hosts file in Windows 8 Pro.

When I open C:\Windows\System32\Drivers\etc\hosts in Notepad++ or any other text editor, make changes and attempt to save, I get a dialog that tells me "Save failed: Please check if this file is opened in another program."

I can't think of what would be using it (other than a browser, IIS, and Windows Defender). I've never encountered this problem in Windows 7. I have used Process Explorer to try and identify any processes that are currently using the hosts file, but when I search Process Explorer for the "Handle or DLL substring" 'hosts' it doesn't return anything. I've looked around Process Explorer to see if there is any other way to search for processes consuming the file, but haven't had any luck.

I've also tried simply stopping the Windows Defender service and stopping the WWW Service.

Best Answer

You have to run Notepad++ as administrator. Otherwise you won't have the neccessary permissions to edit that file.

Related Question