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

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?

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.

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. . .

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.

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.

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.

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?

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.

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.

      • 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

I guess this isn’t a Mac?

Anyway, at 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.

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

http://rpi.net.au/~ajohnson/resourcehacker/

I hope this is what you were looking for.