Skip to content

Access to the path 'C:\WINDOWS\system32\Drivers\etc\hosts' is denied. #1

@davulrich

Description

@davulrich

Hi,

when I try to run wsl2ip2winhosts.ps1 it will always throw the error -
image

I've tried to set permissions on host file for EVERYONE to FULL CONTROLL but still receiving the same error. I can edit it via Notepad but not with PS :(.

How did you make it to edit host file by PS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions