# How to change an icon of an .exe file???



## go4saket (Dec 19, 2005)

Hello Friends! 

Can someone guide me in how to change the icon of an exe file. Actually I have developed a few softwares and now I want to put the logo of my company as the icon of the file. How can I do that? Is there any software that can help me to do it??? 

Thank you.


----------



## lotuseclat79 (Sep 12, 2003)

go4saket said:


> Hello Friends!
> Can someone guide me in how to change the icon of an exe file. Actually I have developed a few softwares and now I want to put the logo of my company as the icon of the file. How can I do that? Is there any software that can help me to do it???
> Thank you.


Hi go4saket,

Here is what I know/suspect, first a little background:

Its easy to change a shortcut's icon, so if you create a shortcut for an executable then there is the Change Icon ... button at the bottom of the Properties window for the shortcut (i.e. right-click on the shortcut and select Properties).

The Change Icon ... button brings up a display for the C:\Windows\system32\shell32.dll library which contains the icons (for WinXP Pro SP2 - i.e. my computer).

In trying to find out how to add an icon to a library or executable:
The icon should be in the file format of an icon image: 32x32x24 BBP (bits per pixel) and the file named with the .icon suffix, e.g. companyname.icon (most icons follow this naming convention).

The only thing I could find was that you should be able to add the icon file to the executable file by linking it into the executable - which is what I suspect is done. Since I do not have a Windows compiler like Visual Studio C/C++ or any suitable Windows compiler that is capable of creating both .exe executables and/or .dll DLL libraries, I cannot confirm this on my computer.

The format for linking any object into an executable goes something like this given that the compiler has already created the executable:

cc -o company.icon company.exe

If that does not work, I would try to rename the company.icon file to companyicon.o and retry the command to link it into the executable file.

Since you have developed the software, I assume you have a compiler and could accomplish the above.

Please let me know if it works or not as I do not have the means to try this out at the moment.

-- Tom


----------



## JohnWill (Oct 19, 2002)

If you're developing the software, it should be easy to compile the icon into the EXE. What development environment are you using?


----------



## go4saket (Dec 19, 2005)

No buddy, I am not a developer. I have a few softwares that I want to have a different icon.


----------



## lotuseclat79 (Sep 12, 2003)

go4saket said:


> No buddy, I am not a developer. I have a few softwares that I want to have a different icon.


Hi go4saket,

Given that you are not a developer may be a handicap, but should not be an obstacle if you are willing to learn how to do it, and gather the necessary tools to do so.

There are other options also, such as using the services of a developer at developer rates, or if you have a friend who is a developer that can help you.

In my previous post I incorrectly indicated that the suffix of an icon file is .icon whiich is not so - i.e. it is .ico, i.e. without the n at the end of it.

If I were in your situation, first I would make sure I had the source code for your application from whomever developed it (maybe inside your company?). If so, you may already have the tools available in your company. If not, I would first want the source, and then I would download and install the Cygwin C compiler for Windows from: http://sources.redhat.com/cygwin/ or
C++ Free compiler: Dev-C++ from: http://www.bloodshed.net/devcpp.html

After successful installation, I would compile and add the <companyiconfile> to the executable as previously mentioned via the C/C++ compiler command to link it into the executable.

-- Tom


----------



## lotuseclat79 (Sep 12, 2003)

Hi go4saket,

Here is some more data on icon file size on my system releated to previous posted data by me:
Reboot.ico 3.18KB (3,262 bytes)
Size on disk: 4KB (4,096 bytes)

Essentially, I extracted the icon for Reboot.ico from the executable siw.exe using Ifranview and saved the icon as Reboot.ico.

SIW.exe used the Windows Restart icon (which cannot be found on my WinXP Pro SP2), which I now use on my shortcut for Reboot on my Desktop, along with the other icons available for Log Off and Turn Computer Off (Shutdown) also on my Desktop.

-- Tom


----------



## blaqDeaph (Nov 22, 2005)

If you dont mind a simpler approach:

Create a shortcut to the program.
Rightclick on the shortcut, properties, and choose "Change Icon"


----------



## lotuseclat79 (Sep 12, 2003)

blaqDeaph said:


> If you dont mind a simpler approach:
> Create a shortcut to the program.
> Rightclick on the shortcut, properties, and choose "Change Icon"


Hi blaqDeaph,

You really need to read/understand the posts from front to back more fully - i.e. go4saket wants to use his own company's icon for the software developed. In that regard, the icon needs to reside in the executable file. Creating a shortcut will only make available the systems set of icons, not the one go4saket has in mind.

In a previous post, what you thought was a simpler approach was already presented as background to familiarize go4saket for what he wants to do.

-- Tom


----------



## JohnWill (Oct 19, 2002)

go4saket said:


> No buddy, I am not a developer. I have a few softwares that I want to have a different icon.


Then I guess I can't explain this comment in your first message. 


> Actually I have developed a few softwares and now I want to put the logo of my company as the icon of the file.


----------

