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

#1
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:

Joe S

Excellent Member
#2
I use an old utility Hosts Toggle HostsToggle
Joe
 


Saltgrass

Excellent Member
Microsoft Community Contributor
#3
I hate to ask, but Windows has protected this file. Is there a huge need on your part to alter it?
 


d8000

New Member
#4
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.
 


Joe S

Excellent Member
#5
The Host Toggle is the simplest you can load and edit with it. It doesn't actually install like the other hosts utilities.
Joe
 


pbcopter

Honorable Member
#6
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.
 


d8000

New Member
#7
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.
Now that is perfection. Awesome tip. Cheers :eek: :razz: :applaud:
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top