Hosts file not editable after Kaspersky "desinfection"

Page 1 of 3 123 LastLast

  1. Posts : 59
    Windows 10 Pro 22H2 19045.3208
       #1

    Hosts file not editable after Kaspersky "desinfection"


    Although I had added the etc folder to my exclusions in my Internet Security settings, Kaspersky messed with my hosts file again.
    In Admin mode I cannot open it, even copy it to another location - always get the "no permission" message:
    https://www.screencast.com/t/Vhlf9gDW88qc
    As seen in the screenshot, I also have other older files like hosts1 in that folder - they also cannot be opened or copied.
    I checked and changed permissions - all is fine.
    https://www.screencast.com/t/WLYnhgDwv
    Haven't heard back from Kasp. Support, but I doubt that it has some sort of grip on that file.

    Would love to hear some suggestions.

    Thanks!
      My Computer


  2. Posts : 5,330
    Windows 11 Pro 64-bit
       #2

    Open the Notepad as a administrator and open the Hosts file with Notepad.
      My Computer


  3. Posts : 8,111
    windows 10
       #3

    The file is by default protected by system so it's read-only and needs admin rights as altering it can be a security risk
      My Computer


  4. Posts : 59
    Windows 10 Pro 22H2 19045.3208
    Thread Starter
       #4

    I cannot open the file with Notepad in admin mode. File is not read protected (...anymore, changed that).
      My Computer


  5. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #5

    attrib -s -h -r hosts
    notepad hosts
    attrib +s +h +r hosts
      My Computers


  6. Posts : 59
    Windows 10 Pro 22H2 19045.3208
    Thread Starter
       #6

    Thanks, Ztunker. I am not a command line champ...
    Hitting enter after entering the first line I get a File not found.
    https://www.screencast.com/t/lxwb50nlqlQ
      My Computer


  7. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #7

    You have to be in the directory the hosts file is in.

    Enter this first: cd %windir%\system32\drivers\etc
      My Computers


  8. Posts : 59
    Windows 10 Pro 22H2 19045.3208
    Thread Starter
       #8

    Ztunker,
    Did that.
    After entering notepad hosts this opened: https://www.screencast.com/t/JkyKzWhG
    Continued with attrib +s +h +r hosts but it's the same screen:
    https://www.screencast.com/t/gUxkCDef3N5g

    But I think "System file" was not there before.
      My Computer


  9. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #9

    Open a Elevated Command Prompt
    Enter the following command in sequence:

    cd %windir%\system32\drivers\etc
    attrib -s -h -r hosts
    notepad hosts
    make any changes
    save and exit
    attrib +s +h +r hosts
      My Computers


  10. Posts : 59
    Windows 10 Pro 22H2 19045.3208
    Thread Starter
       #10

    Oh boy. Same. No permission. Command Prompt was elevated.
    https://www.screencast.com/t/sq9CbdmQ
      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 03:24.
Find Us




Windows 10 Forums