Updating lmhost file
You might get an error when you try to edit the LMHOSTS or HOSTS file in Microsoft Windows 10 that says one of the following: Access to C:\Windows\System32\drivers\etc\ hosts was denied or Cannot create the C:\Windows\System32\drivers\etc\hosts file. This problem is usually related to not having proper rights to the file. Now you should have access to edit the file and no longer receive “Access Denied” messages when attempting to work with it.
If you still cannot edit these files, you may want to look into whether or not you have malware or viruses installed on the computer.
The lmhosts is a local hosts file used by Microsoft Wins Clients that provides mappings of IP addresses to NT computer names (Net BIOS names).
Modifying the hosts file involves adding two entries to it.
Each entry contains the IP address to which you want the site to resolve and a version of the Internet address.
The domain name used is the Net BIOS name, not the FQDN.
If your domain name exceeds 15 characters, you must truncate it at the 15th character, it will still work.