Look at the "Locking the HOSTS File" section on this page at mvps.org, and download the two batch files to lock and unlock your hosts file. (You can just do it manually via command line, but the batch files make it easier.)
PS: the mvps.org site has a nice ready-to-roll HOSTS file you can download.
You can read about it (and download it) from here: http://mvps.org/winhelp2002/hosts.htm
Or, if you just want to grab it straightaway (and already know where it goes), it's here: http://mvps.org/winhelp2002/hosts.txt