Firstly, uninstall Yahoo Messenger and Java, then download and install CCleaner. Clean the registry items and the temporary or other files that are not in use anymore. Reboot the PC and download the packages again (Messenger & Java). Install them and access Start > Run > iexplore. Go to Tools > Internet Options > Advanced> Reset
After this process, go to Start > Run and type the following commands:
and then the next one. You should see a Successful message after pressing enter.
Restart Yahoo Messenger and type something and you will see it will work correctly.