Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i set an icon for my own file extension

i register my file extension in windows with "ftype" and "assoc", this works. now i have the bad looking default icon, how can i change this icon??

like image 846
tomkpunkt Avatar asked Apr 21 '09 08:04

tomkpunkt


1 Answers

HKEY_CLASSES_ROOT\.[extension] default key contains a REG_SZ string, that is the name of the next key:

HKEY_CLASSES_ROOT\[that_string]\DefaultIcon default key ("@") contains this: [path_to_icon_file],[zero_based_index]

Example:

 HKEY_CLASSES_ROOT\.txt
     @="MyTextFile"
 HKEY_CLASSES_ROOT\MyTextFile\DefaultIcon
     @="C:\WINDOWS\explorer.exe,2"

This way, all .txt files will use the third icon from the Explorer executable.

like image 174
Piskvor left the building Avatar answered Oct 14 '22 00:10

Piskvor left the building