Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to edit the Hosts file in 7

12 Sep 2009   #1
ashes

Windows 7
 
 
How to edit the Hosts file in 7

Hi people

I need help here, I have some older applications that wont work unless i change their 'update ip', (dont know what its called), in the hosts file.

I have found numerous ideas on how to edit in the hosts file, but none of them has worked so far.

When I run Notepad as administrator, and from there > Open > Browse to 'C:\Windows\System32\drivers\etc\hosts' it only open a sample of the 'hosts' file. It wont let me open the real file for some reason. I am logged in as admin and additionally I run Notepad as admin too - Which should let me do what ever I want, - Right?



I have already read and tried these 'solutions' but none of them worked:

Edit hosts file in Windows 7 & Windows Vista | Windows Reference

How to: Edit Hosts File in Windows 7 | COMPUTELOGY - Tech, Tips n Reviews on Windows Linux Mac


Is there a work-around to this?

NB: I am using an OEM (dell) version of Win7


My System SpecsSystem Spec
.
12 Sep 2009   #2
Tews

64-bit Windows 8.1 Pro
 
 

You need to Take Ownership of the host file... See Brinks tutorial --==> Here

Also see this .... Hosts File : Use in Windows 7 / Vista
My System SpecsSystem Spec
12 Sep 2009   #3
johngalt

 

If you open the hosts file in the default location, and there is nothing in there....

then the instructions are lying to you and you need to find out where the IP is really being stored.

One thing - how long ago did the IP change? If recently, entering the command
Code:
ipconfig /flushdns
may help resolve this issue.
My System SpecsSystem Spec
.

12 Sep 2009   #4
logicearth

Windows 10 Pro (x64)
 
 

What I do, drag a copy of the host file to my desktop, edit that, then drag the copy back to the rightful location. Done deal.
My System SpecsSystem Spec
12 Sep 2009   #5
johngalt

 

@Tews - I just edited my hosts file without taking ownership - only ran Notepad as admin just as the OP stated.
My System SpecsSystem Spec
12 Sep 2009   #6
z3r010

 

Quote   Quote: Originally Posted by johngalt View Post
@Tews - I just edited my hosts file without taking ownership - only ran Notepad as admin just as the OP stated.

You must of changed something, by default you need to take ownership.
My System SpecsSystem Spec
12 Sep 2009   #7
ashes

Windows 7
 
 

Tews>
Just tried out the 'Take Ownership', but as you see in the link below, it didnt work:

peecee.dk | Vis upload sniped1.PNG

johngalt>
I got this Dell laptop only days ago and reinstalled this OEM of Win7 yesterday. The applications I want to use are really old, but I have some old files that I need to open with them. - I dont think I know exactly what you mean by 'how long ago did the IP change?' or what the command might do for me, - I still need to change the app 'update IP' to another, otherwise everytime I open the application it wont let me continue. :S I used to be able to do this in XP and Vista, but in 7 it seems the hosts file is totally locked somehow?

logicearth>
I've already tried that, but you see - the hosts file that I copy still only shows as a sample no matter where I take it. Editing the sample wont do me anything I'm afraid
My System SpecsSystem Spec
12 Sep 2009   #8
ashes

Windows 7
 
 

Tews>
Here's a bigger picture for you

peecee.dk | Vis upload sniped1.PNG
My System SpecsSystem Spec
12 Sep 2009   #9
ashes

Windows 7
 
 

Just did a search for more entries of a/the hosts file in 7, and this came up -

peecee.dk | Vis upload sniped2.PNG

Do you think that any of the 2 other instances are the 'right' hosts file?
My System SpecsSystem Spec
12 Sep 2009   #10
Orbital Shark

 
 

C:\Windows\System32\Drivers\ETC\Hosts should be the default & correct location for the host file

I've just copied the file to Documents and opened it directly from there, no admin privliges needed. You should be able to edit it, save it, then copy it back to it original home. You will need to confirm a UAC notification....
My System SpecsSystem Spec
Reply

 How to edit the Hosts file in 7




Thread Tools





Similar help and support threads
Thread Forum
Hosts file ignored and replaced with hosts.original
Hello. I am trying to use the hosts file. However both pings and web addresses still bypass the hosts file. I noticed that there is another file in the C:\Windows\System32\drivers\etc directory called 'hosts.original'. When ever I delete this file, it reappears seconds later. I have made sure that...
General Discussion
Hosts File
Hey, I was wondering, is there any internet performance gain if you put a commonly used website's IP (like Google) in your Hosts file, so it doesn't need to ask a DNS server? I mean, because I have 30 websites I go on at least 10 times each day, and it lags when I open all of them :D Thanks!
General Discussion
Hosts file-S??
can the hosts file be changed to, or amended by, another file? IOW can there be a file named xyz that essentially replaces the hosts file, or adds entries to it? Possibly by a registry key or configuration setting? Of course it could by altering library fxns, but by other "simpler" means? ...
System Security
HOSTS File - Create a "Edit HOSTS file" Shortcut
How to Create a "Edit HOSTS file" Shortcut in Windows 7 and Vista The HOSTS file is a .txt file used in Vista and Windows 7 to map hostnames to IP addresses. Your computer checks this file first to resolve any network names to its corresponding IP address before it tries to check the Internet....
Tutorials
HOSTS file
I setup a hosts file in windows xp in order to use my website locally using the exact domain name by editing the hosts file by adding the line: 127.0.0.1 www.test.com This should resolve my local ip address for the test.com site and if apache is running, then it should load the website...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:19.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App