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 regarded important, so like it or not, you have Microsoft default icons.

Desktop icons are for things like the recycle bin, it’s file icons that are no longer customisable. For example the same icon will be used for PHP and TXT files because they are both text file types.

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:

You open the registry by typing regedit in the task bar search box. Then navigate to HKEY_CLASSES_ROOT/Extensions. But, just you try and create a sub-key as advised and it fails there.

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

Step 1

Start regedit.exe and navigate to: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.php\UserChoice

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 it’s 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 given above.

And that’s 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. Note that you will probably need to log out and back in again or restart for the new icon to show.