write the below line in notepad, save it as hosts.bat in your search path. remember to change notepads defaulf file type from ".txt" to "all". now when ever you want to block a site open the run box and enter 'hosts <badsite>.com' and it will be automatically appended to your hosts file


hosts.bat

-------------------------

echo 127.0.0.1 %1 >>c:\windows\system32\drivers\etc\hosts

-------------------------

the %1 gets changed to the first argument after the batch file name when you run it.