There is no relation with Windows Registry problem and avast.
It could be a virus and, in this case, avast could have done (should have done) something.
But, I had this error in the past and it was due to Windows Registry corruption. The keys that identify the user could not be read and Windows started new ones. When I tried, in the past, to recover it I browsed the files into the C:\Documents and Settings like an Administrator, save the ‘useful’ files to another folder and start the configuration all over again :-\
After this, I remove the ‘old’ files of the user.test profile.
I would strongly suggest updating Avast and running a full system scan with security set to high and archive files checked, run a couple of scans with online scanners (such as Trend and Symantec) as backup, and you might want to run the Avast free tool as well which can deal with a number of problems not dealt with by Avast itself. Then run Spybot and Ad Aware and then Disk Cleanup and Defrag. And clean out e-mail program Sent Items and Trash. After that back your files up regularly.