You cannot modify the Hosts file or the Lmhosts file in Windows 7 and Windows 10

When you try to change the Hosts file or the Lmhosts file in Microsoft Windows 10, or Windows 7, you may receive an error message that resembles either of the following.

Error message 1

Access to C:\Windows\System32\drivers\etc\ hosts was denied

Error message 2

Cannot create the C:\Windows\System32\drivers\etc\hosts file.
Make sure that the path and file name are correct.

This issue occurs even though you log on by using an account that has administrative credentials.

WORKAROUND

 

To work around this issue, follow these steps:

  • Click Start 1, click All Programs, click Accessories, right-click Notepad, and then click Run as administrator.

2If you are prompted for an administrator password or for a confirmation, type the    password, or click Allow or Yes.

  • Open the Hosts file or the Lmhosts file, make the necessary changes, and then click Save on the Edit  If using Windows 7, you will need to click Save on the File menu.

source: Microsoft

One thought on “You cannot modify the Hosts file or the Lmhosts file in Windows 7 and Windows 10

  1. It’s appropriate time to make some plans for the future and it is time to
    be happy. I have learn this submit and if I could I desire to recommend you
    some interesting things or advice. Maybe you could write next articles relating to this article.
    I want to learn even more things about it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s