guumaster / hostctl

Your dev tool to manage /etc/hosts like a pro!
http://guumaster.github.io/hostctl
MIT License
1.05k stars 45 forks source link

Acces denied as admin on win10 #6

Closed thesecmaestro closed 4 years ago

thesecmaestro commented 4 years ago

hostctl set -p mdserver --from c:\script\hostctl\mdserver_hosts.txt Using hosts file: C:\Windows\System32\Drivers\etc\hosts Error: truncate C:\Windows\System32\Drivers\etc\hosts: Access is denied.

guumaster commented 4 years ago

You need to run it as administrator. Same as linux, only admins have permission to edit hosts file.

Can you confirm it works if you run it as administrator?

Thanks for reporting the issue.

thesecmaestro commented 4 years ago

No it does not work, i ran it as administrator as the title of the bug stated. I got the truncate error while running as administrator

guumaster commented 4 years ago

I've setup my windows and tested it. It wasn't working properly. I've made some fixes and now it should be fine. Try updating to version v0.5.0.

I'm closing this one. Please feel free to reopen if you find anything else.

Thanks! :tada: