Автор: FuzzyLogic
Дата сообщения: 03.01.2008 00:35
AlexJah
Делается конечно через реестр, только не сильно удобно, потому удобнее взять софт. Почему MS не доделала нормально функционал для данных операций - фиг знает.
Пример:
Код:
Windows Registry Editor Version 5.00
;This links the extension .iso with UltraISO files
[HKEY_CLASSES_ROOT\.iso]
@="UltraISO"
;This tells the OS that .iso files are UltraISO files
;The @="xxx" above must match [HKEY_CLASSES_ROOT\xxx] here
[HKEY_CLASSES_ROOT\UltraISO]
@="UltraISO File"
;This is the custom icon for my ISO files. It's in hex because it's an expandable type.
;What you need to do is import this key, edit the key to point to your icon, then export back to save it again.
;Reason I use expandable is because I can define the variable %portapps% to any path such as e:\portable apps
;This way, if I choose to change the location of portable apps, then all I have to do is modify the variable.
[HKEY_CLASSES_ROOT\UltraISO\DefaultIcon]
@=hex(2):22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\
00,25,00,5c,00,52,00,65,00,73,00,6f,00,75,00,72,00,63,00,65,00,73,00,5c,00,\
49,00,63,00,6f,00,6e,00,73,00,5c,00,49,00,53,00,4f,00,2e,00,69,00,63,00,6f,\
00,22,00,00,00
[HKEY_CLASSES_ROOT\UltraISO\shell]
[HKEY_CLASSES_ROOT\UltraISO\shell\open]
@="&Open"
;Again, this is expandable for the same reason as the icon path.
[HKEY_CLASSES_ROOT\UltraISO\shell\open\command]
@=hex(2):22,00,25,00,70,00,6f,00,72,00,74,00,61,00,70,00,70,00,73,00,25,00,5c,\
00,55,00,6c,00,74,00,72,00,61,00,49,00,53,00,4f,00,5c,00,55,00,6c,00,74,00,\
72,00,61,00,49,00,53,00,4f,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,25,\
00,31,00,22,00,00,00
;And the rest of your registry code goes here. This is the basic for creating your own file types.