Broken icon for txt files


  1. Posts : 59
    Windows 10 Pro 22H2
       #1

    Broken icon for txt files


    Windows 10 Pro 22H2

    UPDATE: I forgot to mention in my post 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!!!!! I'm going to make this thread as solved.

    I use Notepad++ (Npp) as my default text editor and a few days ago the Npp icon for txt files broke. I can’t be 100% sure but 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 icons for docx and xlsx 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
    Last edited by kiwichick; 27 Sep 2023 at 01:14.
      My Computer


  2. Posts : 6,902
    22H2 64 Bit Pro
       #2

    Notepad++ file association (set as default app) is done within the app.

    How to Replace Notepad with Notepad++ in Windows 10

    Also if you want it to always run in place of notepad you can use Image File Execution Options and set it as debugger.

    How to always launch Notepad++ in place of Notepad

    This is useful for example when using things like some hosts file editors and maybe other apps that might launch notepad by default.

    Note: I don't use Notepad++ but have used it in the past.

    Your delete iconcache.db method won't work. You have to terminate explorer and delete all of them.

    Broken icon for txt files-iconcache.jpg

    See:

    Rebuild Icon Cache in Windows 10
      My Computer


  3. Posts : 43,160
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #3

    You can set the icon for any file type you wish using this free utility (and quite a bit more):
    Broken icon for txt files-2.jpg

    Broken icon for txt files-1.jpg
      My Computers


  4. Posts : 6,902
    22H2 64 Bit Pro
       #4

    Anyway also see Notepad Replacement here:

    Other Resources | Notepad++ User Manual

    The IFEO option always works but it won't show as set the default app in set default programs and it won't change the icon for the default app that is already set. It will just always launch Notepad++ in place of Notepad.
      My Computer


  5. Posts : 59
    Windows 10 Pro 22H2
    Thread Starter
       #5

    Thanks for your suggestions.

    Callender said:
    Notepad++ file association (set as default app) is done within the app.
    Yes, I have already set the file associations that I mentioned from within the app.

    I downloaded the batch file and ran it but txt icon is still broken.

    - - - Updated - - -

    dalchina said:
    You can set the icon for any file type you wish using this free utility
    Thanks, I said I've already tried that. It doesn't matter what I choose as the icon, it's still broken.

    - - - Updated - - -

    Callender said:
    Anyway also see Notepad Replacement here:

    Other Resources | Notepad++ User Manual

    The IFEO option always works but it won't show as set the default app in set default programs and it won't change the icon for the default app that is already set. It will just always launch Notepad++ in place of Notepad.
    Thanks for the suggestion but I really just want to work on fixing the broken icon for now.
      My Computer


  6. Posts : 679
    Windows 10
       #6

    Hello

    Maybe try this and see if it helps.

    Go to the Command Prompt and type,

    assoc *.txt =

    Make sure after the equals sign, that you press the space bar once, otherwise the command wont work.
    When you hit enter you'll see taskbar items flash and it should reset.

    Give her a reboot. Im hoping that'll fix it for you. Good luck geeza
      My Computer


  7. Posts : 43,160
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #7

    As that didn't work, it sounds like something's damaged in your registry.

    Start by resetting the association to default for txt using this tutorial, from the huge searchable Tutorials section:
    Restore Default File Type Associations in Windows 10

    You will then need to reassociate txt as you prefer.
      My Computers


  8. Posts : 59
    Windows 10 Pro 22H2
    Thread Starter
       #8

    dalchina said:
    As that didn't work, it sounds like something's damaged in your registry.

    Start by resetting the association to default for txt using this tutorial, from the huge searchable Tutorials section:
    Restore Default File Type Associations in Windows 10

    You will then need to reassociate txt as you prefer.
    Thanks, I got it sorted. I've added what I did to my original post ��

    - - - Updated - - -

    Pluginz said:
    Hello

    Maybe try this and see if it helps.

    Go to the Command Prompt and type,

    assoc *.txt =

    Make sure after the equals sign, that you press the space bar once, otherwise the command wont work.
    When you hit enter you'll see taskbar items flash and it should reset.

    Give her a reboot. Im hoping that'll fix it for you. Good luck geeza
    Thanks, I got it sorted. I've added what I did to my original post ��
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:24.
Find Us




Windows 10 Forums