Cannot save file host

Page 1 of 3 123 LastLast

  1. Posts : 90
    windows 10
       #1

    Cannot save file host


    I open file host by "run as administrator" then I add some lines to block ads on viber desktop or to get access to some web sites which have been blocked on my machine....when I save it will give this
    Cannot save file host-cannot-save-file-host-1.png
    and if I click yes, it will give this
    Cannot save file host-cannot-save-file-host-2.png
    Even I open file host from explorer C:\Windows\System32\drivers\etc it is the same
    Spybot - Search & Destroy has added a lot of line to block web sites, I don't know if it prevents me to save change on file host.
    Please help me to fix it, thank you
    I am using windows 10 version 2004
      My Computer


  2. Posts : 94
    Windows 10 Pro 64 bit. Ver. 22H2, Xubuntu 22.04
       #2

    join said:
    I open file host by "run as administrator" then I add some lines to block ads on viber desktop or to get access to some web sites which have been blocked on my machine....when I save it will give this
    Cannot save file host-cannot-save-file-host-1.png
    and if I click yes, it will give this
    Cannot save file host-cannot-save-file-host-2.png
    Even I open file host from explorer C:\Windows\System32\drivers\etc it is the same
    Spybot - Search & Destroy has added a lot of line to block web sites, I don't know if it prevents me to save change on file host.
    Please help me to fix it, thank you
    I am using windows 10 version 2004
    1. Go to C:\Windows\System32\drivers\etc with explorer
    2. Type on Shift and right-click on an open space
    3. Click on "open command window here as Administrator"
    4. When prompt is open , type "notepad hosts". (Dont type citation marks).
    5. Now you should be able to edit and save the hosts file!

    Regards, snickie
      My Computers


  3. Posts : 90
    windows 10
    Thread Starter
       #3

    snickie said:
    1. Go to C:\Windows\System32\drivers\etc with explorer
    2. Type on Shift and right-click on an open space
    3. Click on "open command window here as Administrator"
    4. When prompt is open , type "notepad hosts". (Dont type citation marks).
    5. Now you should be able to edit and save the hosts file!

    Regards, snickie
    I don't understand "Type on Shift " can you tell more, thank you
    I press Shift and right click on an open space, it gives "open powershell windows here "
    Last edited by join; 08 Oct 2020 at 06:10.
      My Computer


  4. Posts : 94
    Windows 10 Pro 64 bit. Ver. 22H2, Xubuntu 22.04
       #4

    join said:
    I don't understand "Type on Shift " can you tell more, thank you

    You have to type on the Shift key, the one to the left on your keyboard!
      My Computers


  5. Posts : 90
    windows 10
    Thread Starter
       #5

    snickie said:
    You have to type on the Shift key, the one to the left on your keyboard!
    Yes, I did, but only "open powershell windows here "

    - - - Updated - - -

    Now I can open it, let see. Thank you
      My Computer


  6. Posts : 8,111
    windows 10
       #6

    Spybot is old and will fill the host with thousands of lines slowing the internet to a crawl most will be out of date and useless revert it to default then use one of the DNS sites which blocks site live up-to-date and no impact on performance.
      My Computer


  7. Posts : 90
    windows 10
    Thread Starter
       #7

    snickie said:
    1. Go to C:\Windows\System32\drivers\etc with explorer
    2. Type on Shift and right-click on an open space
    3. Click on "open command window here as Administrator"
    4. When prompt is open , type "notepad hosts". (Dont type citation marks).
    5. Now you should be able to edit and save the hosts file!

    Regards, snickie
    I go to C:\Windows\System32\drivers\etc with explorer ==> Shift and right click ==> (it open powershell) ==> type: notepad hosts ==> (it opens file host) then it is the same, cannot save it

    Do you have any other idea? Thank you
      My Computer


  8. Posts : 94
    Windows 10 Pro 64 bit. Ver. 22H2, Xubuntu 22.04
       #8

    join said:
    I go to C:\Windows\System32\drivers\etc with explorer ==> Shift and right click ==> (it open powershell) ==> type: notepad hosts ==> (it opens file host) then it is the same, cannot save it

    Do you have any other idea? Thank you
    I think you have to open notepad with the command prompt, not Powershell.

    1. Right click on Windows start button.
    2. Click on Command prompt (Admin)
    3. When in the command prompt, type cd drivers\etc
    4. Now type notepad hosts

    If you can't save the hosts file now, then you have to edit the security for the hosts file!
    I can edit and save the hosts file this way, but maybe I did some changes to security years ago. I can't remember .-)
      My Computers


  9. Posts : 56,831
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #9

    You're trying to do your work in windows\system32\drivers\etc folder. This folder is a restricted system folder and will stop you at every corner if you try to modify files in-place.

    Copy the Hosts file to your desktop. Do your adds/deletes/whatever to the file there, and save it. Remember, HOSTS has no file extension, so in Notepad you must save it with the option "All Files", not .txt.

    Then, copy and paste your desktop file into the system directory replacing the existing hosts file. There will be a couple of "are you sure?" type questions.

    If you are unable to do this, you will need to take ownership of the HOSTS file. That's a different story. Try this first.


    p.s. - as a side note, Spybot S&D is a dinosaur and somewhat less than useful for anything. I agree, dump it. It's doing nothing but slowing you down.
      My Computers


  10. Posts : 23,283
    Win 10 Home ♦♦♦19045.4355 (x64) [22H2]
       #10

    @join

    I use a 3rd party HOSTS file, so I change these all the time.

    Do what @f14tomcat says... Copy the HOSTS file to your desktop, right click and choose properties, then UNcheck Read only... edit it there, then SAVE it.
    Then right click it, choose Properties, and put a checkmark IN the Read Only box.

    Then go back to the drivers\etc folder and RENAME the HOSTS file to HOSTS.old
    Then drag and drop the edited HOSTS file (that's on your desktop), into the drivers\etc folder.







    /edit

    Alternatively, you can do the same thing IN the drivers/etc folder.
    Just right click HOSTS and choose properties, and UNcheck Read Only.

    Open HOSTS with notepad, edit it and Save it.
    Then right click HOSTS again, and choose Properties, and put the checkmark back in the Read Only box.


    Just tested this myself... works fine.





    In either case the trick is to UNcheck the Read Only box, edit and save it, then REcheck the Read Only box.
      My Computer


 

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

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




Windows 10 Forums