Powered by Windows 7

Updating the HOSTS file in Windows 7

Select a Tip HOSTS News blog

 
  Important! Updating the MVPS HOSTS file in Windows 7  requires special instructions

Microsoft has simplified the process somewhat (from Vista) ...
Simply locate the "hosts.zip" file you downloaded, by default it should be located in your "User" Download folder.
Highlight the file (single-click) then right-click and select > Extract All from the menu ...

Next: Make sure there is a check in the "Show extracted files when complete" option

Next: right-click the installer "mvps.bat" and select: Run as Administrator (see below)

Ok the UAC prompt and the batch file will run ... which will backup the existing HOSTS file (HOSTS.MVP) then copy the updated HOSTS file to the proper location. You should see a completed prompt (press any key) and that's it ...

 

The below screenshot shows the "MVPS HOSTS FILE IS NOW UPDATED" message ...


Editing the HOSTS file

In the event you need to edit the HOSTS file and are unable (system message) it may be due to the "permissions" preventing you from editing the file.

  • Right click the Hosts file and select > Properties
  • Click the Security tab
  • Highlight your user account in the list
  • Press the Edit button
  • Select (place a check in) Full control
  • Press OK in the various dialogue boxes to confirm the changes.


SendTo Tip: if you add Notepad to your SendTo menu, then you can View/Edit the HOSTS file that way.

  • Start > Run (type) shell:sendto (press Ok)
  • File > New > Shortcut then click Browse and navigate to the Windows folder, highlight "notepad.exe"
  • Name your shortcut: Notepad and Ok


You cannot modify the Hosts file or the Lmhosts file in Windows Vista and Windows 7

Note: In the 64-bit version the HOSTS file is located at:
"/windows/sysWOW64/drivers/etc" [source] (in my experience the file is still located at: \Windows\System32\drivers\etc )

The actual location defined in the following Registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

Other strange quirks

I've seen the HOSTS file "Attributes" set to an value of N or I ... as much as I can find it stands for:

FILE_ATTRIBUTE_NOT_CONTENT_INDEXED

On Windows NTFS volumes, the attribute FILE_ATTRIBUTE_NOT_CONTENT_INDEXED can be set for directories and files, so that the directories and files are not indexed by the Windows Indexing Service.

This occurs when (one or more) of the Advanced File attributes are unchecked = File > Properties > Advanced button
Note: to view the "Attributes" you need to add that option in Windows Explorer ... right-click the Header bar and select: More > Attributes

Programs are unable to access the HOSTS file message

  • Windows may detect that the HOSTS file was updated and it assigns a new Security setting to the HOSTS file.

  • Right-click the HOSTS file and select: Properties ... if you see the following message (at the bottom)
    "This file came from another computer and might be blocked to protect this computer"


     

  • Click Unblock, click Apply, click the Security tab (up top) and take "Full Control" of the file (see above)

To view Hidden Files

To allow yourself to view all file types, open Windows Explorer  > Tools > Folder Options > View tab
or Organize > Folder and search options > View tab

  • Scroll down to the Hidden Files and Folders section
  • Select: "Show hidden files and folders"
  • Uncheck: "Hide file extensions for known file types"
  • Uncheck: " Hide protected operating system files"
  • Ok the Prompt, click Apply, Ok

Editors Note: general users should reverse the above when not in need as this exposes all system files, including several on the Desktop (desktop.ini) which you do not want to mess with ...

 
 
 How do I uninstall the MVPS HOSTS file?
 
 

Related Utilities

By modifying the UAC I was able to get HostsMan to work and update the HOSTS file in Vista.
This step was resolved in 3.2.71 Beta7. Win7 users ... see their documentation for more info on "Run as Administrator".
 

You can also use HostsXpert to update the HOSTS file in Win7/Vista/XP ...

 


To contribute a listing for our resources, or any other comments: Contact

Thanks to everyone involved for providing the online update notices for the MVPS HOSTS file. These updates are posted to most major security related sites, Newsgroups, and mailing lists.

This site subscribes to the following: General Criteria for Detection

If you found the MVPS HOSTS file useful ... please consider a donation
Website Privacy Policy | Disclaimer


Reproduction of information on this site, in any form, is prohibited without express written permission.
Microsoft and or MVPS.org are in no way affiliated with, nor offers endorsement of, this site.

Copyright © 1998 - 2010 All rights reserved.
Creative Commons License
This work is licensed under a Creative Commons License.
http://winhelp2002.mvps.org/hostswin7.htm