Jump to content

Getting default icons for files


 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...