Powered by AMD FX-4170

Select a Tip

There's no place like 127.0.0.1 
MVPS Hosts News blog

Updating the HOSTS file in Windows Vista

Important! Updating the HOSTS file in Windows Vista requires special instructions

Due to the restrictions imposed by UAC (Users Access Control) users are prohibited from running any batch files, so the included installer "mvps.bat" does not work unless you turn off or modify UAC (not recommended).

However I have come up with a fairly simple solution ... using the power of SendTo.
[or]
You can Update the HOSTS file via "Elevated" Command Prompt
[or]
You can use one of the Related Utilities specifically designed for this purpose ...
[or]
You can right-click on the included "mvps.bat" and select "Run as Administrator" ... more info here

Updating the HOSTS file via the SendTo method 

The first step is to create a new shortcut in your SendTo folder. Open Windows Explorer to:
\Users\<username>\AppData\Roaming\Microsoft\Windows\SendTo

Note: where "<username>" is your login name
[or]
Start | Run (type) shell:sendto (click Ok)

Next: Right-click in the right pane and select: New > shortcut [screenshot]
In the next dialog box click Browse and navigate to: Windows\System32\drivers\etc
Click Ok and in the next dialog box name the shortcut (example) Update Hosts

In the future when you wish to update the HOSTS file, download the "hosts.zip", extract the included files and right-click on the included updated HOSTS file and select: SendTo > Update Hosts

Note: UAC will prompt for permission for this action, click Ok and proceed ...
Next you will see the below prompt, click Continue and proceed.

Note: this will overwrite (delete) the existing file, so if you have any custom entries in the file I would suggest copying these prior to updating the file. Then open the HOSTS file and paste your custom entries. Alternately you can use the below method that does create a backup of your HOSTS file.

Editors Note: I know this is not a perfect solution, but given the restrictions of the Windows version it is a workable solution until something is found that offers a better method.

Updating the HOSTS file via "Elevated" Command Prompt

You can add a right-click Folder menu option "Open Command Window Here (Administrator)",
Download cmd-admin.reg then right-click and select: Merge (Ok the prompt) ... no need to reboot.

Next extract the "hosts.zip"
Right-click on the newly created "hosts" folder
Select the option:
Open Command Window Here (Administrator)

Next: (type) mvps.bat (press Enter)
You should see the updated message ...

Thanks to Ramesh Srinivasan, Microsoft MVP
for the suggestion

Modify Users Access Control (Administrators only)

Control Panel > Administrative Tools
Select: Local Security Policy (when prompted, click Continue)

In the left pane, expand Local Policies and click Security Options.
In the right pane, scroll down to User Account Control:
Double-click on: "Behavior Of The Elevation Prompt For Administrators In Admin Approval Mode"

In the drop-down box on the Local Security Settings tab
Select Elevate Without Prompting, Click Apply/OK.

Run as Administrator

Once you unzip (extract) the included files in the "hosts.zip" ... right-click on "mvps.bat" and select: Run as Administrator ...

Next: double-click on "mvps.bat" and let the file back-up your existing and then update your HOSTS file ...
Thanks to Thomas H. for providing help on this method ...

Note: do NOT run Windows Vista/7 with UAC turned off as this also turns off the "Protected Mode" in Internet Explorer.

Related Utilities

jv16 PowerTools is the ultimate registry cleaner and Windows tuneup utility suite

PowerTools Lite 2012 is a freeware utility that allows you to easily install the MVPS hosts file

 
HostsMan can Edit, Update and Enable/Disable the HOSTS file ... make sure to "Run as Administrator".
Right-click the Hostsman shortcut and select: Properties ... click Advanced
 

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

If you found the MVPS HOSTS file useful ... please consider a donation 

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 - 2013 All rights reserved.
Creative Commons License
This work is licensed under a Creative Commons License.
http://winhelp2002.mvps.org/hostsvista.htm