I don't know if this works for XP, but it certainly cured a similar problem for me in Windows 98se. Some time ago I copied the Windows 98se cd to my second hard drive to install a file from there. Unfortunately the cd had an autorun.inf file that changed the hard drive icon to a cd drive icon and also causewd the drive right-click menu to have cd drive options. The cure was to put an autorun.inf file in the root directory of the drive.
Create a text file called autorun.inf with the following in it:
Type these 2 lines (I have but a blank line after [autorun] to try to preserve the 2 lines):
In this text, you will replace "filename" with the name of the .ico file or .dll in which the icon is contained. In Windows 98 the icons are in C:\WINDOWS\SYSTEM\SHELL32.DLL. I found this by right clicking on a folder on my desktop, selecting Properties and clicking on the "Change icon" button.
"Number" indicates which icon file you wish to use. If you are using a .ico file, or if you want to use the first icon in a dll, leave this part blank. But if, for instance, you want to use the fourth icon in the .dll (the fourth one that appeared when you were browsing your dll icons replace "number" with "4" (no quotes.) In my Windows 98se system, this was a little confusing because the numbering sequence is top to bottom then left to right, so I think the hard drive icon would be number 9. If this restores your icon, you should then be able to delete the autorun.inf file.