Hosts File Editing

Snappa

New member
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:

My Computer

OS
Windows 7 Home Premium 64 bit
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 10 Pro x64
CPU
Intel Core i5 4440 @Stock
Motherboard
Gigabyte Z97 D3H
Memory
4 x 4GB HyperX Fury DDR3
Graphics Card(s)
Gigabyte GTX 1050Ti O4G
Sound Card
Integrated
Monitor(s) Displays
Dell P2417H
Screen Resolution
1920 x 1080
Hard Drives
Samsung EVO 850 120GB / Toshiba DT01ACA050 1TB 7200prm 32MB
PSU
Riotoro Onyx 750W
Case
NZXT H500 Black-Red
Cooling
Stock CPU + NZXT 120mm + 2x120mm red fans
Keyboard
Modecom Volcano Lanparty
Mouse
Asus ROG Gladius / DeepCool E-Pad Plus
Internet Speed
DOCSIS 50/3 Mbit
Browser
Google Chrome
Other Info
Asus K55VJ(i5 3210M, GT635M / 2GB, 8GB DDR3, 500GB HDD)
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 Computer

OS
Windows 7 Home Premium 64 bit
What editor was using before?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 10 Pro x64
CPU
Intel Core i5 4440 @Stock
Motherboard
Gigabyte Z97 D3H
Memory
4 x 4GB HyperX Fury DDR3
Graphics Card(s)
Gigabyte GTX 1050Ti O4G
Sound Card
Integrated
Monitor(s) Displays
Dell P2417H
Screen Resolution
1920 x 1080
Hard Drives
Samsung EVO 850 120GB / Toshiba DT01ACA050 1TB 7200prm 32MB
PSU
Riotoro Onyx 750W
Case
NZXT H500 Black-Red
Cooling
Stock CPU + NZXT 120mm + 2x120mm red fans
Keyboard
Modecom Volcano Lanparty
Mouse
Asus ROG Gladius / DeepCool E-Pad Plus
Internet Speed
DOCSIS 50/3 Mbit
Browser
Google Chrome
Other Info
Asus K55VJ(i5 3210M, GT635M / 2GB, 8GB DDR3, 500GB HDD)
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Back
Top