Just tried to access my hosts file to make some changes. First thing I notice is that there are a huge number of new entries to the file. Many of these entries are locations I have not been able to make contact with for a long time. I tried to add an entry. I am stopped being told that I do not have permission. I am the administrator for this PC. I should have access to anything and everything. I tried to remove all the new entries and am stopped. Again saying that I do not have access. I play some games, then I'm able to make some changes, but then I'm told that the file is in use and I can't make any changes, same game just different rules. I do some more checking and find that I'll probably be able to make changes in Safe Mode. Little doubt that will work, but what is going on here? Why has the hosts file suddenly become so difficult to work with? Can I fix it and get it back to working like it used to?
Just copy teh host file to the desktop modify it and copy back and overwrite easy solution if it still works
HostsMan also cannot make any changes. The file being in use is the same reason given. @endbase Yeah, I've seen that one too. But if it does work, it's still simply just a workaround. It doesn't fix the problem. HostsMan's trouble leads me to believe that you're suggestion will probably work just as well. Someone or something is messing with my PC, trying to control my usage of it. I don't like it and want it stopped.
What you folks don't seem to realize is that as long as the file is locked because another process is using it, it is locked even to an administrator. The only way around it I can see is in safe Mode while that process has not been activated yet. That doesn't fix the problem. We're still only talking workarounds.
What is causing the host file to be in use I never had that problem to be honest are you using thirth party program that uses the host file?
... sure your host file hasn't by chance been made read only some Anti Virus/Firewalls software (like Zone Alarm) also lock the host file by default, needs to be unchecked in settings
Hosts is protected by design. Open notepad as admin, set it to look for all files, browse to the hosts file and you can edit and save. same as mentioned here: https://forums.mydigitallife.net/threads/hosts-file.83092/#post-1644545
JFC Theres some crass ' Answers ' here . 2 problems = Whats adding things to the host file and whats blocking it . Look at your anti virus and firewall and see if its being blocked . For example zonealarm does it . When did your problem start ? Have you got a back up from before it started ? If not why not Which IPs are being blocked ? Some keygens add things to the hosts file . Did you do malware scans ?
No it's not. I can open mine in notepad++, type any thing I want, click to save it and it will prompt me to open Notepad++ as administrator and still have the changes I made shown. I then click save and that's it. I can then open it with regular Notepad and it will show said changes. So there's something else going on if you cannot open/edit/save it with a text editor as administrator.
I edit my hosts file all the time -- just use notepad++ and save it then notepad++ asks if you want to switch to adimin when it restarts save it again done now get on with your day
Yeah indeed "theres some crass answers here"!!! Blocking or adding/redirecting/resolving hostnames is the same approach!
He already knows that its maliceous because he didnt change it and he cant change it . The best idea so far came from Drew84 @ Problem ......... Time it = How long you spend trying to sort the problem out ............. against how long it would take to delete your system and reinstall it .
I have had similar problems with trying to change the HOSTS file. A couple of things that might help. From a command prompt, attrib -R c:\windows\system32\drivers\etc\HOSTS Try making a copy somewhere else, edit the copy, and then use File Explorer to copy the edited file back to the original location. If all else fails, reboot. I have found several times that immediately after a reboot I can accomplish things that simply would not work before. A friend of mine, one of the best unix admins I have ever had the pleasure of working with, told me once that he wanted to put an icon on all of the companies PCs (approximately 50k Windows desktops worldwide). The icon would be labeled, "FIX ALL PROBLEMS", and would simply reboot the PC.
I have found that many if not almost all the entries in my hosts file are variations of Pirate Bay URLs. There are hundreds of them listed on there. I've never heard of most of them before. I am blocked from making any additions or deletions by its being accessed by another process. As I remember, there was the hosts file and maybe a couples of other files in the etc folder. Now there are a number of new files in there: hosts.backup, hosts.check, Imhosts, Imhosts.sam, as well as what I think were the original files: hosts, networks, protocol, and services. it's beginning to look to me as if someone is trying to control where I go online, Nobody has that right, except me.. EDIT: I had to add " .txt " to the file to get it to show in Explorer.
I had d/l'd sysinternals last night. I got a huge, very long list where it was very difficult just to find one entry that did seem to point to the hosts file., That was Explorer there may have been more but it looked to be difficult and time consuming to nail anything down. So, I put it down.