Jump to content
Sign in to follow this  
Achilles

Getting default icons for files

Recommended Posts

Achilles

Each icon has an icon based on it's file type. Is there a way to find a path to this icon (or the exe that contains it)? I've searched some but haven't found any thing related to this.


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites
bobbintb

i dont quite understand what you are saying. are you trying to specifically access a certain image in the icon file?

Share this post


Link to post
Share on other sites
TurionAltec

File extension associations are stored in the registry under HKEY_CLASSES_ROOT.

Good luck trying to make sense of it.

eg:

HKR\.wav\(Default)=VLC.wav

HKR\VLC.wav\DefaultIcon\(Default)="c:\Program Files\VLC\vlc.exe",0

HKR\.doc\(Default)=Word.document.8

HKR\Word.document.8\DefaultIcon\(Default)=C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0150048383C9}\wordicon.exe,1

Share this post


Link to post
Share on other sites
Zedna

Each icon has an icon based on it's file type. Is there a way to find a path to this icon (or the exe that contains it)? I've searched some but haven't found any thing related to this.

You searched badly ;-)

#623934

Edited by Zedna

Share this post


Link to post
Share on other sites
Authenticity

You can also use this function from shell32.dll. Search the forum, there as been many examples to this particular case.

Share this post


Link to post
Share on other sites
Yashied

Each icon has an icon based on it's file type. Is there a way to find a path to this icon (or the exe that contains it)? I've searched some but haven't found any thing related to this.

I use the following. Returns a path to the icon and its index in "pure" form.

#Include <WinAPIEx.au3>

Global $Ext = '.au3'

ConsoleWrite('(' & $Ext & ')' & @CR)
ConsoleWrite('--------------------' & @CR)
ConsoleWrite('Type: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_FRIENDLYDOCNAME) & @CR)
ConsoleWrite('Command: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_COMMAND) & @CR)
ConsoleWrite('Executable: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_EXECUTABLE) & @CR)
ConsoleWrite('Icon: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_DEFAULTICON) & @CR)

WinAPIEx.au3

Edited by Yashied
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×