Custom hosts file in Windows 8.1 problem, HELP ....

Discussion in 'Windows 8' started by qwertykop, Sep 20, 2014.

  1. qwertykop

    qwertykop MDL Novice

    Oct 16, 2010
    6
    0
    0
    Cliffs
    - using custom hosts file in Windows 7-below = pleasant, wonderful experience
    - using custom hosts file in Windows 8.1 = unpleasant, a lot of hair pulling and teeth grinding
    - can any of you in the know give me the "exact steps in succession in the right way of implementing custom hosts in Windows 8.1" (what used to worked in 7 does not translate to 8.1)?
    - thank you!
     
  2. nexus76

    nexus76 MDL Addicted

    Jan 25, 2009
    788
    296
    30
    it's the same on win7 or win8(.1), open cmd as admin and then

    notepad drivers\etc\hosts

    make your changes and press ctrl+S or save from menu,
    flush the dns cache using

    ipconfig /flushdns

    at admin prompt and you're done.
    What's the problems you have exactly?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,730
    6,673
    270
    hrm, havent had to do anything other than notepad with admin.
     
  4. qwertykop

    qwertykop MDL Novice

    Oct 16, 2010
    6
    0
    0
    #4 qwertykop, Sep 20, 2014
    Last edited: Sep 20, 2014
    (OP)
    - I am using a hosts file customized through "hostsman" so it is quite large (33mb and getting bigger)

    In Windows 7 and below:
    a. First thing I do is, DNS service DISABLED.
    b. replace original hosts file with hostsman's customized hosts
    c. browse internet and whole system is responsive, ad-free = zero complaints

    In Windows 8.1
    a. First thing I do i, DNS service DISABLED
    b. replace original hosts file with hostsman's customized hosts
    c. browsing internet and whole system is unresponsive, albeit ad-free = computer use experience crawls to a stop

    Also if, still in Windows 8.1:
    a. First thing I make sure, DNS service AUTOMATIC
    b. replace original hosts file with hostsman's customized hosts
    c. whole system is responsive but, internet browsing takes 5 minutes and upwards to load a page = grinding teeth

    Again, my hosts file is quite large at 33mb+ and rising as I continue to update it with hostsman. I suppose I also need to mention that I used "optimize hosts file" in hostsman which uncluterize by putting 9 hosts in one line.
     
  5. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,544
    662
    60
    I've never had to touch any DNS service. Why???
    just change your hosts file, nothing more...
     
  6. SpeedDream

    SpeedDream MDL Addicted

    Feb 20, 2012
    619
    121
    30
    efa11 is right you can't just edit hosts file from notepad windows, wont let you save it directly and makes you save it on the desktop, the only options are:
    run notepad as admin like efa11 said or save in desktop and then copy to C:\windows\system32\drivers\etc
     
  7. nexus76

    nexus76 MDL Addicted

    Jan 25, 2009
    788
    296
    30
    please read carefully, I wrote "open cmd as admin and then notepad drivers\etc\hosts"
    now you can save directly using notepad from the admin cmd but some antivirus sw or
    windows defender possibly prevents access to this file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    8,096
    27,017
    270
    hosts is a read-only file, even admin notepad won't be able to save it directly
     
  9. MrMagic

    MrMagic MDL Guru

    Feb 13, 2012
    5,837
    3,924
    180
    #9 MrMagic, Sep 22, 2014
    Last edited by a moderator: Apr 20, 2017
  10. nexus76

    nexus76 MDL Addicted

    Jan 25, 2009
    788
    296
    30
    on Windows 8.1 x64 I see:

    out of the box it's not readonly ;) but as someone mentioned above
    windows defender is protecting the hosts file
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,088
    60
  12. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,773
    1,088
    60
    #12 Mr Jinje, Oct 5, 2014
    Last edited by a moderator: Apr 20, 2017
    This pops notepad.exe elevated so it will save properly.

    Code:
    Function Hosts {
    
    $Editing = New-Object System.Diagnostics.ProcessStartInfo 'Notepad.exe';
    $Editing.Arguments = 'C:\Windows\System32\Drivers\etc\hosts';
    $Editing.Verb = 'RunAs';
    [VOID][System.Diagnostics.Process]::Start($Editing)
    
    }
    
    Hosts
    
    
     
  13. mtr123

    mtr123 MDL Novice

    Nov 11, 2012
    21
    3
    0
    When I found difficulty in saving I used Notepad++ to edit and save. Had no problem in saving.