Windows 7 How can I change hosts file ? It won't let me

d8000

New Member
Joined
Mar 31, 2011
I didn't find a hosts file in the SysWOW64 folder, but I did find one in the "usual" place windows\system32\drivers\etc and I see it's NOT set to read-only. But when I try to edit it with notepad and save as "all files" rather than .txt (to avoid notepad giving it a .txt extension) it fails to save. It tells me I don't have permission (even though my user account is an administrator).

Is there some reg trick to allow me to change it? I've got a bunch of mappings I want to put in there.
 
Last edited:
I hate to ask, but Windows has protected this file. Is there a huge need on your part to alter it?
 
I use an old utility Hosts Toggle HostsToggle
Joe
Thanks, that looks useful, bookmarked it for the future.

I hate to ask, but Windows has protected this file. Is there a huge need on your part to alter it?
Fairly huge. Larger than Windows need to protect it :)

The answer was annoyingly dumb. Just copy the file to another location, edit it there, and then copy it back. Then you're only presented with a typical administrator privilege prompt, to which you can click "continue" and it's done.
 
The Host Toggle is the simplest you can load and edit with it. It doesn't actually install like the other hosts utilities.
Joe
 
If you open Notepad at an elevated level (right click the Notepad icon and select "Run as Administrator"), you can edit the file where it is.
 
Back
Top Bottom