Hosts File & Windows 7 fresh install, just wondering..

Discussion in 'Windows 7' started by tnx, Jan 31, 2011.

  1. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Hi all you clever lot on here.
    I am just sat at my PC getting ready to put a fresh copy of W7x64 onto one of my spare drives. There are some programs i wish to try out and i dont want to ruin my existing Windows,well not yet.

    One of the new programs needs the "hosts" file to be altered. This itself is dead easy but i was just wondering what if the amended hosts file could allready built into the windows disc ready for a fresh install.

    I would not have a clue where to start looking at the files on the disc...

    Is this a cockermany idea ?

    It's like another cockermay idea. You know Photoshop does not handle .icon files without a "Icon Plug-In" what if this plug-in,or any plug-in could be added to the install before hand....

    This to me sounds like a good idea...:cool:
     
  2. Trinket

    Trinket MDL Senior Member

    Feb 20, 2010
    487
    169
    10
    #2 Trinket, Jan 31, 2011
    Last edited by a moderator: Apr 20, 2017
  3. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Thanks for that reply...
    Firstly...Making a new image is OK,dont have a problem in doing that.What i meant was i would not know where to find the hosts file within the disc file structure. If i could find it in there it would sound simple just to ammend it.Do you know how to change this file within the file structur of an install disc ?

    Secondly that link you put up, i downloaded two hosts file,one which was 0's ???
    Wow i have never seen a hosts file have so much info on it. Are you saying this new hosts file will keep me saver while surfing ?

    Is it just a matter of fact of pasting the new file into "\Windows\System32\drivers\etc" or copying the text on the file into the existing hosts file.
    Plus should this file be made "read only" ?

    Just looked more closely..They are just text files.

    You say the one you use is based on that site....What about the actuall one you use,care to share ?

    Cheers...
     
  4. searchengine

    searchengine Guest

    @tnx... you could do this,

    Make this folder Structure:-

    1. $oem$\$$\System32\drivers\etc
    2. put copy of your custom hosts file in "etc" folder
    3. add this $oem$ folder to the sources folder of your Win7.iso

    ...the contents of the $oem$ folder will be silently copied to windows during installation.
     
  5. Trinket

    Trinket MDL Senior Member

    Feb 20, 2010
    487
    169
    10
    #5 Trinket, Jan 31, 2011
    Last edited: Jan 31, 2011
    OK well if you feel comfortable editing your ISO yes do as searchengine suggested, that will be a more integrated solution (but also one you'd have to updated more tediously, depending on how many times year you reinstall, that is ;)

    I just always copy and paste the hosts info on that page their and customize it with my stuff later. I'll PM you mine in a bit. Yes, it does keep you safer while you surf, most definitely.

    If you use the cmd, just enter the entire thing from that site (and your own) to that 'open line' and save. Then apply, and it will create/amend your hosts file in the system32\drivers\etc location automatically. If you want to edit your ISO, then just save the hosts file (yeah read only is fine) in the suggested folder structure and it will get copied there automatically upon installing Windows. Take care when you save the hosts file from within Notepad, not to give it the .txt extension. It should have NO extension, the file is simply called "hosts". But you may not be able to tell if you have file extensions set to 'hide' in Windows.

    Yes, you can open them with Notepad. But like I said, do not save them with the .txt extension -- no extension, just 'hosts'.

    EDIT: PM sent
     
  6. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Thank you guys for those replies...They are great. Just the thing i was looking for....

    @ Trinket..."how many time a year" i do a fresh insall.....Sorry but this made me chuckle to myself....Can you change it to "how many times a MONTH"........LOL.......

    Gunna go hunt down my PM...

    Thanks again guys...
     
  7. Trinket

    Trinket MDL Senior Member

    Feb 20, 2010
    487
    169
    10
    lol "how many times a MONTH" -- I'm right there with you :D

    Good thing with Win7 it allows for large hosts files like that; you don't wanna be trying that with WinXP as it will slow your system down terribly. Just thought I'd mention it in case an XP user read this ;)
     
  8. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Well i finally found some spare time to mess with testing a fresh install of W7...

    This method worked a treat mate...Thanks very much. The amended hosta file slot straight into position...


    :cool: