Batch script to write a line in host file to block a website
I will be sending this remotely. I know how to do it on my PC manually, but I need the batch command to send remotely to block a website.
Please help
I have tried
@echo off
set hostspath=%windir%\System32\drivers\etc\hosts
echo 0.0.0.0 www.facebook.com >> %hostspath%
exit
but it doesnt work.