Share via

Rewrite the hosts file in the C:\Windows\System32\drivers\etc directory.

Anonymous
2017-12-09T22:12:07+00:00

Hello,

I'm trying to create a virtual host on my laptop so I can download my website from a web host onto my computer and work on it directly on my computer. One of the requirements is to change the hosts file located in C:\Windows\System32\drivers\etc. However, after I made the canges to the file and tried to save it, the message I got was:

C:\Windows\System32\drivers\etc\hosts

You don't have permission to save in this location.

Contact the administrator to obtain permission.

Would you like to save in the Documents folder instead?

The problem with this is this is a personal computer not attached to any network. I'm the only user setup as the administrator. This is a Windows 10 computer. So how can I get full access permission within the Windows directory?

Thanks for the help,

Bob Gatto

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. DaveM121 872.6K Reputation points Independent Advisor
    2017-12-10T08:29:41+00:00

    Bob, glad that worked for you . . .

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-12-09T23:50:37+00:00

    Hello again,

    No need to reply I figured it out. I opened the text editor that coms with the Host File Editor and deleted the number signs there. That text editor gave me the permission to save. Thanks for all the help.

    Bob Gatto

    3 people found this answer helpful.
    0 comments No comments
  3. DaveM121 872.6K Reputation points Independent Advisor
    2017-12-09T22:16:53+00:00

    Hi Bob, making changes to he hosts file is not for the feint hearted, Windows will fight you all the way . . .

    The good news is a developer over on GitHub wrote a small utility to do it for you

    Click the link below, on that page, click 'Clone or Download' - Download Zip

    Unzip the file and install Hosts File Editor

    https://github.com/scottlerch/HostsFileEditor

    Once installed, open the app add the changes you need and your done!

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2017-12-09T23:41:45+00:00

    Hi,

    Thanks for the app. It helped me out a little. I was able to add the lines in. However they were added with  start of a number sign making it a comment. Do you have any idea how to remove comments or add lines with this app so the line is  not added as a comment?

    Thanks again,

    Bob Gatto

    1 person found this answer helpful.
    0 comments No comments