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).
8. Edit the (default) value data, mentioning the path to a icon file. For this example, I downloaded a nice Notepad icon (.ico 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. 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:
9. Exit the Registry Editor.
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.
About the author
Ramesh Srinivasan founded Winhelponline.com 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.