How to Change the Default Icon for a File Type in Windows?


It’s surprising that Windows doesn’t have a built-in option to allow users set custom icons for file types. There are 3rd party tools like FileTypesMan and Default Programs Editor that can change the file type icons and association settings; but this post tells you how to do it using the Registry Editor.

Change Icon for a File Type Using Registry Editor

Let’s assume you want to change the file type icon for .txt files, and here is how to do that.

  1. Click Start, type regedit.exe and press ENTER
  2. Navigate to the following branch:
  3. In the right-pane, note down the value data for Progid (e.g. txtfile). This is the user chosen (via Default Programs or Open with dialog) Programmatic Identifier for the file extension.

    Registry Branch Not Found?

  4. If the UserChoice branch does not exist, navigate to the following branch:
  5. In the right-pane, note down the (default) value data (e.g. txtfile).
  6. Navigate to the following key (where txtfile is the Prog ID noted in Step 2 or Step 4 above)

    If the DefaultIcon key does not exist by default, you need to create it manually.

  7. In the right-pane, double-click (default) and mention the path to your custom icon (.ico file or reference to a icon inside a EXE/DLL file. See “Icons From DLL/EXE Files” paragraph at the end of this article).
  8. Edit the (default) value data, mentioning the path to a icon file. For this example, I used a notepad icon file from the web, saved it to a permanent location and mentioned the full path.

    If you’re using a custom icon file, make sure it’s at least 128 x 128, although it’s not a rule but this is to make sure icons look nice when folder view is set to large or extra large icons.

  9. Exit the Registry Editor.
  10. Logoff and login back, or refresh the icons and see if the Text file icons are now updated.

Icons From DLL/EXE Files

If you don’t have a custom .ico file, you may use the icon picker dialog box to choose an icon from a EXE/DLL file. To launch the icon picker dialog, right-click on a folder in your system, click Properties. Click the Customize tab, and click Change Icon… button. Use the icon picker to choose the icon and make a note of the index. The index starts from “0” and you need to proceed vertically when counting (top to bottom.)

Browse to shell32.dll or imageres.dll and note down the icon index, simply cancel the icon picker dialog and close folder properties dialog.

For example, to set the 260th icon in Shell32.dll, mention the following path, in Step 8:


To make it clear, this procedure doesn’t change the file type associations, only the icon assigned to that file type. If the icons don’t update even if you restart Windows, clear and rebuild the icon cache.

Don’t want to edit the registry manually? Then check out FileTypesMan or Default Programs Editor that can do the job quickly.


About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.

16 thoughts on “How to Change the Default Icon for a File Type in Windows?”

  1. Thank you for the useful information. But the “Default” key is no longer called so in Windows 7, but rather called “Standard”. Actually this confused me a bit till I noticed, since I’m not too familiar with messing with registry ^^.

  2. Is there any way to change the icon of just one file? I made a program and compiled it to an .exe and I don’t want it being the VB6 icon(i know, it’s old). But I have windows 7. I could do it on my old windows XP computer, but not on my new one

  3. VB6? You need an upgrade, my friend.

    From VB6 IDE menu “Project\ Properties”, select “Make”-tab”. There’s “Icon”-drop down, select the form which has the icon you want for your EXE-file.

  4. Thanks, this was a big help. But you should add an explanaition on how to “manually add the DefaultIcon key.” I decided to right click on the abcfile and found I could choose Key as an option.

    Also, my Windows 7 doesn’t have a Change Icon option on the Customize tab. There is a section for “Folder pictures” with Choose File that lets you browse for a file.

    I used this as a workaround by copying the image I wanted into the Pictures folder and using that path in step 7.

  5. .jpg and .png have different icons, but both open with Windows Photo Viewer.
    This is what I would like: .m3u and .flac to have different icons, but both open in winamp.

  6. Everything works, got mp3, m3u, and flac with different icons, all opening in Winamp, thanks!
    I didn’t feel like restarting, so as in the link I pressed start…default programs…set your default programs… and made firefox my default, which it already is.

  7. This blog entry was immensely helpful to me. Can’t thank you enough. I was having a really hard time getting the correct icons for pdf files.

  8. There is a much easier and safer solution (at least for Win 7). See if your issue is the same as mine: I had .mp4 files set to open with VLC. They were named as VLC files, VLC had them selected as a default file type in the ‘Set Your Default Programs’ dialogue, and VLC was also the default in the file ‘Properties’ tab in Explorer. BUT, the icon for mp4 files was not the VLC icon, it was the Windows Media icon.

    This solved it:

    In the start menu, type ‘default programs’ and then go to that menu. Pick the 2nd option, ‘Associate a file type or protocol with a program’. When the list populates, choose the file type and click the ‘change association’ button. Choose the desired program, EVEN IF IT IS THE SAME PROGRAM YOU ARE CURRENTLY USING. When you hit ‘ok’, you will see that the file type icon now matches the program icon.

    Let me know if this works for you!

  9. go to


    Right clock on userchoice, select delete

    restart computer…..

  10. Nemo,
    Thank you very much! That solution worked very well for what I was attempting to do. I appreciate the help.

  11. Ridiculously convoluted way to simply change a bloody icon.

    “One step forward, two steps back” seems to be the motto for Microsoft

  12. The icon change is a multi-level problem. There are several “levels” at which one could/should change the icon.
    The following might help in cases where the above mentioned solution did not succeed.
    Example: Installed software (e.g. Inkscape 64-bit build) does not contain an icon in its exe.
    Action: *.svg is assigned via: right click -> open with -> … select path to inkscape.exe
    Result: all *.svg files show the icon inkscape.exe does = none
    Solution: execute regedit, search for: inkscape.exe (name of *.exe you did assign to file type) continue until you locate: HKEY_USERS\…\…\Software\Classes\Applications\inkscape.exe\… (…\Applications\[your software].exe\…).
    Under inkscape.exe add DefaultIcon key. Now next to other folders (e.g. …\shell) inkscape.exe\DefaultIcon\ should be available. Now edit the default key to the path to the icon file you want to assign. In this case (including the “) “C:\Program Files\Inkscape-0.48\inkscape.ico” did result in the selected icon being displayed for all *.svg files (analogue the files you associated with your software).
    Note: Icon cache can be either refreshed by 1) using “Set default” for a random file with random program you use to edit it (e.g. right click *.txt-> open with the default txt program you open it with anyway)) 2) changing screen resolution from 32-bit to 16-bit and back again 3) Restarting the computer
    Below find a list of seemingly random, working exemplary icons paths as encountered from the registry:
    “C:\…\Program.exe”,0 or C:\…\Program.exe or C:\Windows\System32\imageres.dll,-109 (number as explained above) or “C:\..\program.ico” or “C:\…\Program.exe,0 (no second “) or X:\…\Program.ico or “C:\PROGRA~1\…\PROGRAM.DLL”,-114

  13. When setting file association to some portable exe program, this maual-working steps comes to handy.

Comments are closed.