Windows 7 Forums


Windows 7: Hosts File Editing

10 Apr 2011   #1

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.

Last edited by Snappa; 10 Apr 2011 at 04:11 AM.. Reason: More information
My System SpecsSystem Spec

10 Apr 2011   #2

Windows 7 Ultimate SP1 x64
Macedonia
 
 

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

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

Windows 7 Ultimate SP1 x64
Macedonia
 
 

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

Windows 7 Home Premium 64 bit
 
 

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

Windows 7 Pro X64
Space Coast of Florida
 
 

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 problems?



Thread Tools



Similar help and support threads for: Hosts File Editing
Thread Forum
editing hosts file General Discussion
Solved Hosts file editing: save problem General Discussion
HOSTS File - Create a "Edit HOSTS file" Shortcut Tutorials
BSOD after editing hosts file and running warcraft 3? BSOD Help and Support


All times are GMT -5. The time now is 06:00 AM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32