I would like to open both .pdf and .htm files with Chrome on my Win10 Laptop. This I could achieve. But now the icons for both file types are the usual chrome icon.
That becomes confusing. I'd like to have different icons for .pdf and .html but both to be opened by the same Chrome exe.
Is this possible?
I found one possible answer here: How to change the icon associated with a particular file format (and only that file format) on Windows 10?
I did use the "Defaults editor" program but it seems to list both .pdf and .htm together so I cannot set the individual icons.
I even tried making a shortcut to chrome, using that as the default program to open pdfs and setting its icon differently. But even that did not seem to work.
Any tips? How can I achieve this?
Best Answer
I have created a "Chrome PDF icon.reg" script, based on the info from change-default-icon-file-type and set-custom-icon-pdf-files-firefox.
It works with Opera in a similar way - see the "Opera PDF icon.reg" script below:
You need to save the above code in a text file with a ".reg" extension and double click it, to put it into the registry. Once it's done, you just right click any PDF file and in its properties change the "Open with" to Chrome or Opera. You may revert it to your previous choice anytime.
The path to the PDF icon needs to be corrected according to where you keep it. You may also try to use a '@="@{Microsoft.MicrosoftEdge_44.18362...' as a path to the PDF icon - it will be the same one as the Microsoft Edge is using for PDF files. I did not test yet, whether it works after Windows/Edge update (when the version changes) though. In case of Opera, you also need to correct the UserName in the path to Opera launcher.
Good luck! ;-)