Application & Associated Document Icons Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ZaphireDfox
Posts: 2
Joined: 09 Mar 2018, 19:22

Application & Associated Document Icons

09 Mar 2018, 21:06

I have over a dozen programs, all from the same company, that all use the same file extension for all of the data files they create, and only the specific program that made the data file can read it correctly. Thankfully, every data file has a tag in the first few bytes of the file that identify what program created it. So I've made and compiled a script to do just that, read the first few bytes, figure out what program to use, then start it. Now I can just double click on any these data files to auto-launch the appropriate editor when needed. Works great! The only annoyance, now ALL of the data files have the compiled script's icon on them (which ended up being the AHK icon initially) instead of the generic "unassociated" document icon. It's not terrible, just an "ugh" type thing. My question, is there a way, within the script or during compile, to tell AHK what ICO file to use for associated documents? I've already figured out how to do that for the application itself, but not it's documents. I suppose I could just use the "unassociated" document icon as my application icon, but I'd like to figure out a nicer solution that would allow the application and associated documents to each have their own icons. Sadly, my Google-fu is not coming up with anything helpful or similar.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Application & Associated Document Icons  Topic is solved

10 Mar 2018, 06:41

Taking the wav extension as an example:

Code: Select all

HKEY_CLASSES_ROOT\.wav
(Default)	REG_SZ	WMP11.AssocFile.WAV

HKEY_CLASSES_ROOT\WMP11.AssocFile.WAV\DefaultIcon
(Default)	REG_EXPAND_SZ	%SystemRoot%\system32\wmploc.dll,-734
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ZaphireDfox
Posts: 2
Joined: 09 Mar 2018, 19:22

Re: Application & Associated Document Icons

16 Mar 2018, 20:00

Ahh, thank you. Got stuck thinking it had to be done in AHK somehow. Didn't consider the registry. (which I can change in the AHK... durr)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 351 guests