I had this issue as well (though I'm on Windows 10). After reading @Rich's answer I decided to search for "notepad++" in Regedit and see what I could find. I spammed my way through with F3 for a while until I came across this key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\notepad++.exe
It contained a key called ShellEx
, which itself contained a key called IconHandler
. I decided I could safely delete the notepad++.exe
key because I could just reinstall NPP if it broke things. Lo and behold, I only had to press F5 in Explorer for the Notepad++ icons to reappear. Then I just used Disk Cleanup to delete the thumbnail cache so that folder thumbnails regenerated.
I realise this isn't the ideal answer format but I'll post it anyway because I couldn't find this information anywhere else.
Update: It's happened again a couple more times in the past few months. Sometimes deleting the registry key isn't enough and I have to change the default program for the XMLs (or CSVs, or which file format is showing the incorrect icon) to some other program and then change it back again.
Did you try right-clicking an XML file / Open with / Choose default program, then selecting Notepad++ and ensuring the Always use selected program option was checked? – Karan – 2013-01-09T17:01:38.610
@Karan Yes. It does open with Notepad++, it's just the icon that's not changing. – SeinopSys – 2013-01-09T17:02:19.677
Try resetting the ICON using the file Properties selection. – mdpc – 2013-01-09T17:06:34.133