I've never seen that error caused by a virus. All of the times that I've seen it, it was simply caused by a race condition at shutdown, that causes write-cached not to be properly flushed, so that the registry doesn't get written back to disk properly, and thus is corrupted and unreadable at next reboot. Additionally, it could also likely be caused by an unstable system, overclocked/overheating CPU, bad RAM, underpowered/unstable PSU, etc.
But virus? No. There would be no point in "infecting" the registry (directly), it's not an executable file, and if anything, a virus would use it to install registry entries to cause its own infected binaries to run, which means that it wouldn't try to destroy the registry, since it would need it to propegate.
Best solution that I've seen, to workaround the problem with write-cache flushing, is to disable the ability of Windows' to power-off your system when you shut down, and additionally, clear the pagefile during shutdown, giving the other pending writes a change to complete, and thoroughly flushing any IDE HD's write-cache contents to disk, due to the size of the pagefile that is written. (At least, that's predicated on the idea that the pagefile gets flushed after all open files are written, including the registry. If that's not true, then this could be bad info, but it has worked for me for years, after I used to occasionally get those "SYSTEMced is corrupt" errors in W2K about every six months.)
If the OS is W2K SP2 or prior, there is a DISK.SYS hotfix for write-cache flushing issues, and it was also supposedly fixed in SP3, or if you are using XP SP1, there is a hotfix as well, which was also supposedly fixed in XP SP2.