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: Can't Edit Hosts File

07 Mar 2017   #1
FirstShirt

Windows 7 Home Premium 64-bit SP1
 
 
Can't Edit Hosts File

I'm unable to edit my Hosts file located in C:\Windows\System32\drivers\etc folder.

I am using Notepad by opening it via "Run as Administrator." Also, I have changed to properties of Hosts to allow it's modification. For some reason the "Special Permissions" box is ghosted out and not selectable. (See image)


After allowing for all "Permissions" that the system would allow, I rebooted and still could not save the Hosts file, except as a .txt file.

I have also tried using Notepad++ ver 7.3.2 x64. In fact, I can not only not Cut & Paste into this file, but I can not type any characters into this file at all.

I wonder if some maintenance program might be preventing this files modification. I have the full version of Malwarebyte's running. Exiting out of it and using Task Manager to search and end it's services did not work, either.

Just a side note: My Desktop taskbar (at the bottom) will no longer autohide even though the box is selected when I look in properties.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gateway Laptop
Operating System
Windows 7 Home Premium 64-bit SP1
CPU
Intel Mobile Core 2 Duo T6600 @ 2.20GHz
Penryn 45nm Technology
RAM
4.00GB Dual-Channel DDR3 @ 398MHz (6-6-6-15)
Motherboard
Gateway NV78 (uPGA-478)




Attached Images
Can't Edit Hosts File-permissions-4-hosts.png 
My System SpecsSystem Spec
.
07 Mar 2017   #2
samuria

win 8 32 bit
 
 

save it to another location then copy it say yes to allow if uac kicks in
My System SpecsSystem Spec
07 Mar 2017   #3
Lance1

Windows 7 Ultimate, Service Pack 1, 64 bit
 
 

Check the permissions for your login account. Change the permissions for that account so you can make modifications.
My System SpecsSystem Spec
.

07 Mar 2017   #4
FirstShirt

Windows 7 Home Premium 64-bit SP1
 
 

Quote   Quote: Originally Posted by samuria View Post
save it to another location then copy it say yes to allow if uac kicks in
Alas, that doesn't work either. I copied the Hosts file to the desktop, modified it and tried to replace the original. It would not allow it.
My System SpecsSystem Spec
07 Mar 2017   #5
FirstShirt

Windows 7 Home Premium 64-bit SP1
 
 

Quote   Quote: Originally Posted by Lance1 View Post
Check the permissions for your login account. Change the permissions for that account so you can make modifications.
How do I do this?
My System SpecsSystem Spec
07 Mar 2017   #6
Lance1

Windows 7 Ultimate, Service Pack 1, 64 bit
 
 

Quote   Quote: Originally Posted by FirstShirt View Post
How do I do this?
Click the link and look at this. hope it helps..

https://media.giphy.com/media/l0Iym1...YkU/source.gif
My System SpecsSystem Spec
08 Mar 2017   #7
townsbg

Windows 7 pro 64-bit
 
 

Something might be using it. Try booting into safe mode.
My System SpecsSystem Spec
08 Mar 2017   #8
lehnerus2000

W7 Ultimate SP1, LM18.2 MATE, W10 Home, #All 64 bit
 
 

You could load up a Live Linux CD/DVD/USB and then use the text editor to edit the file.
My System SpecsSystem Spec
08 Mar 2017   #9
Barman58

Windows 10 Pro x64 x2 Windows 10 Enterprise x64, Ubuntu
 
 

Although the Host file system is a depreciating technology, (most modern Firewalls and security suites have the option to control blacklists with a lot more usable interface), it is still checked by windows. The way I have always edited the Host file is either run as, (full), admin or right click Notepad.exe and run notepad as administrator, open the file, edit and save. If there is a problem that prevents this I would suspect some form of malware, (adding a nefarious link or several, and removing edit permissions from the users to prevent repair)

As the Hosts file has the potential to seriously compromise your system I would not recommend changing the file permissions in any way. Changing to give "Everyone" or "All users" is a bad idea, as it also gives Malware permissions to edit the file which is never a good idea.
My System SpecsSystem Spec
08 Mar 2017   #10
Alejandro85

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by FirstShirt View Post
I wonder if some maintenance program might be preventing this files modification. I have the full version of Malwarebyte's running. Exiting out of it and using Task Manager to search and end it's services did not work, either.
Without too much information at hand, given the things already tried, I would give this guess a chance.
Antiviruses may attempt to block changes to it (as it's a common target for some malware), so try disabling those first. Using task manager to kill processes and services is not enough, as real time antiviruses use kernel-mode drivers to do their job. Instead, use the antivirus interface and select the option to disable the "protection", and see if you can change the hosts file. Reenable all antiviruses afterwards.
My System SpecsSystem Spec
Reply

 Can't Edit Hosts File




Thread Tools




Similar help and support threads
Thread Forum
Unable to edit hosts file
Hello, I have a laptop that it doesn't allow me to edit hosts file. I tried many ways first I tried to give myself permissions in properties - edit but it gave me 'access denied' when trying to apply.. And I tried a method I found on google is to open a notepad with administration then open the...
General Discussion
When edit hosts file, it will reload with the default value.
Hi All, When I edited the file hosts in the etc folder, its saved successfully, but after 10 seconds, it will revert to default value. Any additional value will be removed. I already tried make it read-only, change owner, disable AV, disable Windows Firewall, disable UAC. any help will be...
System Security
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
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...
Network & Sharing
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


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 20:58.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App