You may have had a malware infection that was only partially removed.
Typically when you get a virus it makes an entry in your registry instructing your computer to run the virus every time you start. Your antivirus may have found the virus and deleted it, but this entry is still in your registry, which is why you are getting the error message. Using the AutoRuns
utility you should be able to locate this entry and delete it.