Is it possible to write-protect the hard disk with only software?
The answer is no. There are several programs which claim to do that, but *all* of them can be bypassed using only the currently known techniques that are used by some viruses. Therefore you should never rely on such programs *alone*, although they can be useful in combination with other anti-viral measures.