Unique Icon for PDF Files

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Unique Icon for PDF Files

22 Jan 2023, 21:48

I there a (good) way to use Autohotkey to make windows show an icon for my PDF files that is not the same as my browser icon, when the browser is the default PDF opener?

e.g. I use Chrome to render PDF files, so Windows shows the Chrome icon for all my PDF files. I want an icon that indicates the file is a PDF, not an icon that looks like the file is a saved web page.

One way I can think of to do this would be to create a shim in Autohotkey that takes a file name and opens that file with the browser. "Compile" that script into a .exe. Make the icon for the .exe be a PDF-appearing icon, and register that program as the default PDF-opener.
kkleinfelter
Posts: 32
Joined: 21 Dec 2018, 10:59

Re: Unique Icon for PDF Files

23 Jan 2023, 14:00

How odd! This is only a problem with Chrome as my default PDF reader, but not with Edge. i.e. I can tell Windows 11 that I want Edge to open my PDF files, and Windows selects a nice "PDF" icon for PDF files, not the Edge icon or the Chrome icon. But if I make Chrome the PDF opener, I get the same icon for HTML and PDF files.

For the time being, I've set Edge to render my PDFs, while having Chrome as my default browser. When I have time, I'll write the shim I mentioned above. That may be a useful shim for other icon-replacement efforts.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mstrauss2021, Spawnova, zephyrus2706 and 361 guests