Skip to content →

HOWTO: Edit the HOSTS File in Vista

Recently a reader asked how to save their HOSTS file in Vista, because it wasn’t letting them save their changes. Vista is a bit different from previous versions of Windows. Vista introduced the new User Account Control (UAC) to help protect common users from malicious activities. In doing so, UAC has also hindered productivity. Not only does it ask you to confirm everything you want to do, it blocks your access to edit the HOSTS file. Let’s fix this so you can have complete control of it.

There are two methods to get around this problem:

1. Turn UAC Off

Go to Start > Control Panel. In the top right search box, enter UAC. The search will return 1 result which will let you toggle UAC on or off. Click on the result and uncheck Use UAC… This will require a reboot, but it will save you time in the future.

2. Copy, then overwrite the HOSTS file

Navigate to the etc folder located @ c:\windows\system32\drivers\etc\. Copy the HOSTS file to your Desktop and edit it accordingly. Make sure it’s named hosts, not hosts – Copy. Drag it into the etc folder and when you’re asked to overwrite the existing file, say yes.

Published in network security time savers windows


  1. Tomas Tomas

    To edit HOSTS file in Vista just simply run Notepad as administrator then open HOSTS file located at c:\windows\system32\drivers\etc\ …

  2. Jered Jered

    The other way to modify the hosts while leaving UAC is to right click it go to properties. Then go to security click on “Users(*ClientnameHere”\Users) then click edit. After that click on the same item on the new window and check the full control box. Now you are set as you have full control on that user to modify this file, while leaving the added security UAC causes.

  3. Mike Acker Mike Acker

    what extension is associated with HOSTS?


  4. Neo Neo

    I’ve done EVERTHING on here… I know how to and have changed it… but EVERY SINGLE time, even if I run Notepad and/or Wordpad as an ADMIN (since it’s my NEW Personal PC and i’m the ONLY user) it says: “C:\Windows\System32\drivers\etc\hosts is in use by another application and cannot be accessed.”

    What GIVES!? And if I try/save/have the existing ALREADY Modified Hosts file on my desktop and DRAG it over or copy/paste to REPLACE it, it says: “This action can’t be completed because the file is open in another program Close the file and try again.”

    No matter what I do, and I have FULL access, and i’ve restarted it 2x with NOTHING open other than the computer being ON, it says that same THING!!!

    A lil help would be GREATLY appreciated! =)

  5. Mark Mark

    Hi Neo,

    I would download Process Explorer (try here). When you have it open, press Ctrl+F and in the search box enter in the word hosts. If there are any things in the list below with the hosts file open, you can close them. Click the entry in the result then on the top portion of the main window it will highlight the correct line. Right click that line and choose Kill Process. Once all of the eprograms that are accessing the file are closed, try again.

  6. Following Jered’s approach works for me on Windows7.


Comments are closed.