How To Change File Type Icon In Windows 7, 8 And 10?

When Windows is unable to find a customer default icon for certain file type in your computer, it displays such type of files with a generic default icon on your desktop and Windows Explorer. For example, check out the image given below. You will find that Windows has used a default icon with the MyDocs4.myp file.

change-file-icon-in-windows-step1

As you can see in the image above that the first three files are a simple text file and thus bear the same icon by default, however, MyDocs4.myp is bearing the Windows default icon. This is because Windows has “.txt” file as a registered file type but not “.myp” file format.

Now, in the next image, you can see that “.myp” format file has been assigned a custom icon.

chnage-file-icon-in-windows-step2

If you also wish to assign file type icon to certain file types in your computer, you can do so easily by following the steps provided below.

Steps to Assign File Type Icon in Windows 7, Windows 8, and Windows 10

1.) To assign a custom file type icon to a file type, start by creating a subkey named DefaultIcon in any of the following locations:

  • For an application assignment, HKEY_CLASSES_ROOTProgID
  • For a file-type assignment, HKEY_CLASSES_ROOT.extension

2.) Next, you will need to assign a default value of type Reg_SZ to the DefaultIcon subkey which indicates the complete qualified path for the files containing an icon.

3.) Then, you will need to call the SHChangeNotify function in order to notify the Shell to update the icon cache.

In the below-given example, you can see a complete view of the registry entries which are required for the assignment of the file-type icon. While the file name extension is associated with an application, the icon assignment is associated with the file name extension so that the associated application does not use the default icon.

change-file-icon-in-windows-step3

This example is displaying the detailed view of registry entries necessary for the assignment of an application. Firstly, the “.myp” file name extension is associated with the MyProgram.1 application and then the MyProgram.1 ProgID subkey is assigned with the customer default icon.

change-file-icon-in-windows-step4

NOTE: A file which contains an icon is acceptable, for example, .ico, .exe, and .dll files; however, if there are more the one icons in the file, the path must be followed by a comma and then by the index of the icon.

And, this is how you can change the file type icon in Windows 7, Windows 8, and Windows 10.

Leave a Comment