After trawling the internet for hours it dawns on you that Microsoft developers in their arrogance have chosen not to allow you to set custom icons for file types. So how are you supposed to change default program icons for file types in Windows 10?

Ever since Dosshell 5 you’ve grown accustomed to working with a visual display of files and file attributes, and since Windows for Workgroups you’ve come to expect a different image to represent each file type. So it seems these visuals are no longer important, so like it or not, now you only have the Microsoft default fonts.

Desktop icons are for things like the recycle bin but file icons are no longer customisable. For example the same icon will be given as default to PHP and TXT files because they are both text files.

There is a way to assign a new icon for a specific file extension by creating a key in the registry. This is the advice normally found on the web and seems pretty straightforward:

Open the registry by typing regedit in the task bar search box. Then navigate to HKEY_CLASSES_ROOT/Extensions. Now, try and create a sub-key – not easy right?”

A utility program like Default Programs Editor can change the file type icons but from here we will look at doing the job manually. So without further ado let us look at a different approach with the Registry Editor. For this example we will give PHP files their own icon.

step 1

Start regedit.exe and navigate to:

Double-click on ProgId and look at the Value data. In this example the value reveals that the application program notepad++.exe is assigned to open PHP file types.

This is a customisable value that can be re-assigned by the user in Windows 10 Default Programs and this is how the Registry associates file types with applications.

The individual entries for the file extensions are held elsewhere in the registry under:


So we will now navigate the registry again and take ourselves to:


We are going to create a sub-key called Defaulticon to link the default value to the default icon. So at this point we just need to make a note of the Value data in the Default key, which in this example is: php_auto_file

Let’s first sort out an icon image file that has an .ico extension. I used a .png file and converted it to an .ico file online at Place the icon file with the Windows 10 system files, in the system32 folder.


The native Windows 10 icons are kept here in files like imagesres.dll, pifmgr.dll, shell32.dll and of course explorer.exe as well as many others. So my icon path is:


Okay, so now to make the sub-key Defaulticon. This value can be either of type REG_SZ or REG_EXPAND_SZ. Right-click on the ‘php’ folder or anywhere inside the right side pane and select New and then String Value.

Assign ‘Defaulticon’ as the Value name. And for Value Data assign the icon file path that we discussed earlier.

And that’s about it. Exit the Registry by clicking on the top right X, yes I know it feels unnatural to exit without saving but it’s all done on the fly with the registry.