Broken icon for txt files
-
This may be a Windows issue but, seeing as it only affects Npp, I’m starting here to see if I can get a solution.
The Npp icon for txt files is broken. I can’t be 100% sure bit I think it happened when I uninstalled a version of Microsoft Office 2013. After that I noticed icons for txt, docx, and xlsx files were broken (maybe other Office file icons too but I didn’t check them) and, as far as I’m aware, the txt icons were fine before that. When I reinstalled Office the docx and xlsx icons came back but not txt. All the other file types I have associated with Npp still have the Npp icon but, for txt files, all I get now is the default ‘unknown’ file type, plain white icon. Text files still open using Npp.
Things I’ve tried:
- I changed the default program for txt files (via Windows Settings > Choose default applications by file type) to Notepad and Wordpad to check if the icons display for those and they do. When I changed it back to Npp the icon is still broken.
- I reset the Windows icon cache by deleting iconcache.db from my system then restarted Windows Explorer. That made no difference, so I also restarted my PC.
- I used two third-party apps (Default Programs Editor and FileTypesMan) to change the icon to something completely different to one from notepad++.exe.
I know I can check/edit/delete entries in the registry but I’m not sure which would be causing this issue. I did look here and the icon setting is correct: HKEY_CLASSES_ROOT\Notepad++_file\DefaultIcon
-
UPDATE: I forgot to mention that I’m using the portable version of Npp. So I decided to install the standard version, then uninstalled it using the option to delete settings files. Then I re-associated txt files with my portable version and the icon is fixed!!!
-
@deleelee That’s excellent news. When you had posted yesterday I looked at my Notepad++ as I thought there was an option to re-apply the registry settings needed to associate file extensions such as .txt with Notepad++. It appears the Notepad++ installer has the logic to fix the associations.
It’s one of those areas where Microsoft never fully documented the process nor provided an API. People have figured out and documented the registry tweaks over the years but as it’s “internal” to Windows Microsoft makes occasional changes which results in much of the public documentation being outdated or of little to no affect.
-
@mkupper said in Broken icon for txt files:
That’s excellent news.
I’m so relieved because it was doing my head in 😂