jonhadfield / python-hosts

a hosts file manager library written in python
MIT License
125 stars 33 forks source link

PermissionError on Windows #34

Closed sla-te closed 3 years ago

sla-te commented 3 years ago

How could I elevate to get permission to edit the host file. Running the Script as described drops me Errno 13, Permission Denied. Ive even already tried using this: https://pypi.org/project/pyuac/, which works for any file located on the root drive but not inside the Windows\System32 folder.

sla-te commented 3 years ago

Err, yeah nvm xDD Should add the hosts file to the end of this path so it can work lol