Hosts File Editing


  1. Posts : 12
    Windows 7 Home Premium 64 bit
       #1

    Hosts File Editing


    I've tried everything I've read on this forum to be able to edit my hosts file. I log on as administrator, I open my editor as administrator, I take ownership of the hosts file, but I still get the error:-

    "Save Failed. Please check whether if this file is opened in another program."

    What else do I need to do ?

    Thanks for any help.

    I should add that Apache is not running.
    Last edited by Snappa; 10 Apr 2011 at 04:11. Reason: More information
      My Computer


  2. Posts : 8,679
    Windows 10 Pro x64
       #2

    Maybe you can try this. To run Notepad/Notepad ++ as Administrator(Right Click -> Run as Administrator) and select Open File. Browse the hosts file and try to edit and save it then.
      My Computer


  3. Posts : 12
    Windows 7 Home Premium 64 bit
    Thread Starter
       #3

    False alarm. Problem is with my editor (not notepad). It couldn't see the etc folder under drivers when trying to find and open the hosts file. Searching for hosts, explorer found another in a really obscure folder, and it was this I was trying to edit. Problem solved using notepad. I'll have to find out what's happening with my editor.
      My Computer


  4. Posts : 8,679
    Windows 10 Pro x64
       #4

    What editor was using before?
      My Computer


  5. Posts : 12
    Windows 7 Home Premium 64 bit
    Thread Starter
       #5

    Notepad++
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #6

    I have a little batch file called xhosts.bat I use to do this.

    @echo off
    c:
    cd \windows\system32\drivers\etc
    attrib -r hosts
    notepad hosts
    attrib +r hosts
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:43.
Find Us