# Ok...how do import an icon into an .exe file?

**URL:** <https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430>\
**Category:** Factual Questions\
**Created:** [October 4, 2001, 7:22pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430 "2001-10-04T19:22:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kwyjibo](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@Kwyjibo](https://boards.straightdope.com/u/Kwyjibo)\
**Post date:** [October 4, 2001, 7:22pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/1 "2001-10-04T19:22:42Z")

</div>

I have an Icon Creator.  
I’ve made the icon I need, but I can’t figure out how to get it into the file I want.

I’ve done searches on Google, but I’m not getting anywhere. When I find a page that looks promising, it’s not up.

Anyone?

---

<div class="post-metadata">

**Author:** ![El\_Zagna](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@El\_Zagna](https://boards.straightdope.com/u/El_Zagna)\
**Post date:** [October 4, 2001, 7:41pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/2 "2001-10-04T19:41:31Z")

</div>

I don’t think there is anyway to do that unless the development tool that you used to create the file allows for it.

I could be wrong though.

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [October 4, 2001, 7:51pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/3 "2001-10-04T19:51:30Z")

</div>

Did you build the exe yourself? I used to do this in Windows 95 using Borland C++ to build the exe, it included an icon editor and built the icon into the exe.

I have never heard of a tool that lets you take an existing exe and stuff in a different icon. I guess it might be possible. . .

---

<div class="post-metadata">

**Author:** ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)\
**Post date:** [October 4, 2001, 8:04pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/4 "2001-10-04T20:04:52Z")

</div>

I can only “me too” **bnorton** and **jseigle** ’s responses. I’ve never seen a way to change an icon without going back to the source and recompiling. However, you can change the icon used by a shortcut, so you might be able to accomplish nearly what you want by creating a shortcut to the file and setting it to use your icon.

---

<div class="post-metadata">

**Author:** ![Kwyjibo](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@Kwyjibo](https://boards.straightdope.com/u/Kwyjibo)\
**Post date:** [October 4, 2001, 8:05pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/5 "2001-10-04T20:05:37Z")

</div>

It’s actually a self-extracting Zip file.

I am putting a order form package together for work and would like to have the company logo as the icon in the zipped “.exe” and the Shortcut file in the Zip but without having the .ico file laying about.

---

<div class="post-metadata">

**Author:** ![Diver](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Diver](https://boards.straightdope.com/u/Diver)\
**Post date:** [October 4, 2001, 8:15pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/6 "2001-10-04T20:15:02Z")

</div>

If you mean the icon that is exhibited by a shortcut or in the taskbar, you can right click on the existing icon and then click on “change icon” and browse to the location of the new icon. If you want to add it the exe file so it automatically shows up as the icon for the program - I think the other posters are correct, I don’t think you can.  
It can be done at compile time - you can add a selection of icons then, but after that I don’t know of a way to do it.

---

<div class="post-metadata">

**Author:** ![Kwyjibo](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@Kwyjibo](https://boards.straightdope.com/u/Kwyjibo)\
**Post date:** [October 4, 2001, 8:30pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/7 "2001-10-04T20:30:14Z")

</div>

> [@](#):
>
> \*Originally posted by Diver \*  
> **If you mean the icon that is exhibited by a shortcut or in the taskbar, you can right click on the existing icon and then click on “change icon” and browse to the location of the new icon.**

I am familiar with that method, but when you change the icon for a shortcut, does it import the icon into the shortcut or only link to the icon file?

> [@](#):
>
> \*Originally posted by Diver \*  
> \*\*If you want to add it the exe file so it automatically shows up as the icon for the program - I think the other posters are correct, I don’t think you can.  
> It can be done at compile time - you can add a selection of icons then, but after that I don’t know of a way to do it. \*\*

Damn, that’s what I thought. Ah well, it’s the shortcut file that the customer will see most often anyway, so I guess that’s the important one.

---

<div class="post-metadata">

**Author:** ![Mekhazzio](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@Mekhazzio](https://boards.straightdope.com/u/Mekhazzio)\
**Post date:** [October 5, 2001, 6:18pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/8 "2001-10-05T18:18:10Z")

</div>

I’m pretty sure this could be easily done, within limitations. If the executable in question has an icon built in, seeing as how it’s just a bitmap and can be located by standard means (which is how Windows reads em) it should be easy to replace without recompiling. You’d be restricted to using the exact same icon as in the file already with respect to resolutions and color depth, but that’s not much of a price to pay seeing as how 32x32x16 is generally all that’s used.

However, I don’t know of any program to do this automatically. If you’re the type to get your hands dirty, figuratively speaking, any good hex editor should be quite capable of the job.

---

<div class="post-metadata">

**Author:** ![DougC](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@DougC](https://boards.straightdope.com/u/DougC)\
**Post date:** [October 7, 2001, 1:16pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/9 "2001-10-07T13:16:25Z")

</div>

> [@](#):
>
> If you mean the icon that is exhibited by a shortcut or in the taskbar, you can right click on the existing icon and then click on “change icon” and browse to the location of the new icon… - Diver

- 
  - 
    - Um, maybe, but not in Win98. -Or 95 either, I think. There’s at least two sorts of icons you see, “system” icons and “program” icons. System icons are the generic ones that are included with the OS. Program icons are the program-specific ones that programs “bring along”.

- In Win98, the common _built-in_ icons file you can “change” is not a simple group of images: the bitmaps are compiled together into a single system file (I forget the name right off). You can (back-up and) hack the icons file manually wth a suitable tool and by trial-and-error make your own icons for it, but at no time does it have the ability to point to a regular common image file.
- _Program_ icons are compiled into the program they came along with. - MC

---

<div class="post-metadata">

**Author:** ![handy](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@handy](https://boards.straightdope.com/u/handy)\
**Post date:** [October 7, 2001, 3:42pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/10 "2001-10-07T15:42:26Z")

</div>

I guess this isn’t a Mac?

Anyway, at [download.com](http://download.com) search for ‘icon’ there seem to be a lot of programs of all kinds for dealing with them. Here is one:  
AX-Icons is a powerful and easy-to-use program for editing and managing icons. It is ideal for  
retouching, creating, archiving, and distributing icons. It allows you to create all kinds of icons  
in sizes from 16-by-16 pixels to 72-by-72 pixels, as well as custom sizes. The built-in editor  
includes tools for numerous painting effects: gradients, lines, rectangles, ellipses, text  
insertion, mirrors, rotations, color replacement, 3D frames, multiple brush sizes and shapes,  
undo/redo, advanced palette support, fill, and more. Version 4.5 features a new interface,  
“favorites” list management, enhanced bitmap importation, the ability to export as a bitmap,  
and the ability to save as DLL.

---

<div class="post-metadata">

**Author:** ![Squee](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@Squee](https://boards.straightdope.com/u/Squee)\
**Post date:** [October 7, 2001, 4:21pm UTC](https://boards.straightdope.com/t/ok-how-do-import-an-icon-into-an-exe-file/85430/11 "2001-10-07T16:21:10Z")

</div>

Try using a resource editor. I have used this one with great success:

[http://rpi.net.au/~ajohnson/resourcehacker/](http://rpi.net.au/~ajohnson/resourcehacker/)

I hope this is what you were looking for.
