Windows – How to change the default icon for .url in Windows

filetypeiconswindowswindows-registry

How do I change the filetype icon for .url?

I have used Default Programs Editor to change it, but it does not work. This initially made me think that the program doesn't work on Windows 8, but it does actually work for other filetypes like .txt.

It gives an option to export a .reg file instead of directly editing the registry, so I know what it is doing is this:

Windows Registry Editor Version 5.00

; Created with Default Programs Editor
; http://defaultprogramseditor.com/

; Edit File Type Icon
[HKEY_CURRENT_USER\Software\Classes\IE.AssocFile.URL\DefaultIcon]
@="D:\\Icons\\Chrome URL.ico,0"

Why isn't it working for this filetype?

Best Answer

The icon of .URL files are treated in another way then normal extensions. The icons are bound to the registered protocol handler which is mostly your default browser.

Additionally the system distinguishes between HTTP, HTTPS, FTP and mailto links
(and some other irrelevant)

enter image description here


But you can change them without to change your default browser. I describe my own approach when I changed the icons.

  • First you have to know what browser is registered to your HTTP and HTTPS Windows shortcuts
    (.url files)
  • Then you could search in your regedit.exe where the default icon is stored. In my example I registered a portable browser with this guide. As you can see in the guide the default icon is stored in the following location

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ OperaHTML \DefaultIcon]
    @="C:\\tools\\operaPortable\\opera.exe,0"
    
    Note: The bold part will differ according to your own registered browser

  • The second line defines your new icon. The zero/null at the end defines the used icon index which is relevant if your chosen .exe or .dll contains more than one icon. First icon will be index=0, second icon=1 and so on.
  • Search for this entry and change the default value enter image description here Unfortunately I can't give you an English screen but it provides the relevant information too
  • You have to do this for all protocols you want to change.

Important: Please take a full backup immediately before you change anything in your registry. This way you can revert easily when you messed up something.

Related Question