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: Hosts File Editing

10 Apr 2011   #1
Snappa

Windows 7 Home Premium 64 bit
 
 
Hosts File Editing

I've tried everything I've read on this forum to be able to edit my hosts file. I log on as administrator, I open my editor as administrator, I take ownership of the hosts file, but I still get the error:-

"Save Failed. Please check whether if this file is opened in another program."

What else do I need to do ?

Thanks for any help.

I should add that Apache is not running.


My System SpecsSystem Spec
.

10 Apr 2011   #2
StalkeR

Windows 7 Ultimate SP1 x64
 
 

Maybe you can try this. To run Notepad/Notepad ++ as Administrator(Right Click -> Run as Administrator) and select Open File. Browse the hosts file and try to edit and save it then.
My System SpecsSystem Spec
10 Apr 2011   #3
Snappa

Windows 7 Home Premium 64 bit
 
 

False alarm. Problem is with my editor (not notepad). It couldn't see the etc folder under drivers when trying to find and open the hosts file. Searching for hosts, explorer found another in a really obscure folder, and it was this I was trying to edit. Problem solved using notepad. I'll have to find out what's happening with my editor.
My System SpecsSystem Spec
.


10 Apr 2011   #4
StalkeR

Windows 7 Ultimate SP1 x64
 
 

What editor was using before?
My System SpecsSystem Spec
10 Apr 2011   #5
Snappa

Windows 7 Home Premium 64 bit
 
 

Notepad++
My System SpecsSystem Spec
10 Apr 2011   #6
Ztruker

Windows 8.1 Pro X64
 
 

I have a little batch file called xhosts.bat I use to do this.

@echo off
c:
cd \windows\system32\drivers\etc
attrib -r hosts
notepad hosts
attrib +r hosts
My System SpecsSystem Spec
Reply

 Hosts File Editing




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
editing hosts file
I am trying to modify the hosts file so that it will block certain websites. I tried the following code, but it does not seem to do anything when i visit the website (as in, the page loads normally): 127.0.0.1 asite.com what am i doing wrong? i made sure i saved before viewing the website.
General Discussion
Hosts file editing: save problem
My Hosts file was lost so I downloaded a new one. This I edited to block two sites that had intruded and given trouble. I saved initially to desktop and then tried to paste and save it in to C:\windows\.......\etc , but failed to do so as error as per att, appeared, I am a sole user/...
General Discussion
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
BSOD after editing hosts file and running warcraft 3?
Hello, this is my second BSOD so far. i had one analysed months back, and this is my second. this is what i got after restarting my laptop: Problem signature: Problem Event Name: BlueScreen OS Version: 6.1.7600.2.0.0.768.3 Locale ID: 18441 Additional information about the...
BSOD Help and Support

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 08:17.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App