How can I extract an icon from a file-type and apply it to a shortcut?

9

3

I have a file of type *.xyz that has a nice icon. I would like to set that icon as the icon for a shortcut on my desktop. However, the "change icon" option in the properties dialog can only extract icons from .dlls, .exes, and .icos. I have had no luck finding the .dll/.exe/.ico from which this file's icon originates.

How can I find the resource containing the icon used for a particular file extension?

Eric

Posted 2010-06-27T12:24:51.807

Reputation: 385

Answers

9

if you are familiar with the registry, that info is stored under HKEY_CLASSES_ROOT

  1. open regedit (don't mess around and change anything)
  2. there will be a list of folders in the treeview on the left, click on the one that is called "HKEY_CLASSES_ROOT". look through that long list for the extension .xyz
  3. when you click on it, the filetype will be listed.
  4. now search down the list under HKEY_CLASSES_ROOT until you find that type
  5. under that type will be a folder called DefaultIcon where you will find the icon used

bigjohnny

Posted 2010-06-27T12:24:51.807

Reputation: 386

That's not working for me. I can find the extension folders no problem, but there don't seem to be DefaultIcon folders within them. Are they hidden to non-admininstrators? – Eric – 2010-06-27T18:06:11.723

Oops, didn't read that properly. Yep, I've got it working now. Piece of advice: use an ordered list next time in your answer - it makes it easier to read. – Eric – 2010-06-27T20:46:58.037

4

Use IrfanView, www.irfanview.com, one of the more useful free programs on the web.

Install it, run it, and drag the .exe onto IrfanView's window.

The icon will show up in the IrfanView screen. If there are multiple icons, you can page through them by clicking the DOWN arrow on the menu bar at the top of the IrfanView screen.

You can save an icon to a separate file using File -> Save As. You can export all of them using OPTIONS -> EXTRACT_ALL_FRAMES. Try different file types for the best resolutions. .ICO file type is a good place to start.

I just extracted about 50 icons from a Windows 3.1 executable in about 1 second.

johnrefling

Posted 2010-06-27T12:24:51.807

Reputation: 41

2

IconsExtract can do this for you.

Tamara Wijsman

Posted 2010-06-27T12:24:51.807

Reputation: 54 163

I don't think it works for what I'm trying to do. That extracts icons from a .dll or .exe. I want to know which .dll or .exe a certain file-type gets its icon from.

Also, I'm having difficulty finding a download link – Eric – 2010-06-27T12:47:26.067

Click your language at the bottom of the page... It can search through your whole disk for all existing icons and makes sure you will find it. If you know more specific of where it could be you could only search in C:\Program Files\ApplicationNameHere or C:\Windows to find it even quicker. See the related questions for alternatives, but I think it's quicker to scroll through icons than opening the locations you see there 1-by-1... – Tamara Wijsman – 2010-06-27T13:07:34.480

Good point. That's the feature that I was missing from the change icon menu. – Eric – 2010-06-27T14:28:49.177

1

Maybe IconViewer is what you're looking for.

bizarrechaos

Posted 2010-06-27T12:24:51.807

Reputation: 71

0

have you tried resource hacker or resource tuner ... this might help too : Change the Default Icon of an Exe

Vizz

Posted 2010-06-27T12:24:51.807

Reputation: 1

My problem is more: "given a file-type associated with no program, find (or extract) the icon file used for the file". – Eric – 2010-06-27T14:28:10.830