Important alert: (current site time 8/2/2014 12:10:40 AM EDT)
 

winzip icon

Change Icon in compiled EXE

Email
Submitted on: 4/12/2005 2:49:29 PM
By: Kevin Smithwick  
Level: Intermediate
User Rating: By 17 Users
Compatibility: VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 13054
author picture
(About the author)
 
     This will mod PE headers of compiled EXEs to change their icons.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 6 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

4/12/2005 3:57:04 PMzoom

This works perfectly most give some kind of error or courpt the file but not this one it works great good job 5 from me cuzz its one of the few working ones i have found
(If this comment was disrespectful, please report it.)

 
4/12/2005 9:28:08 PMenmity

it DOES works, but not for those icons that are large than 16x16, such as 32x32; or those colors exceed 256, such as 16M, true color etc. Any idea?
(If this comment was disrespectful, please report it.)

 
4/12/2005 10:48:39 PMImmortal Tako

look around on vbaccelerator.com for imaging stuff -- due to VB's color limitation, we are kinda limited to just 256 colors. You may want to check this out:

http://www.vbaccelerator.com/home/VB/Code/vbMedia/Image_Processing/Image_Pro cessing_Using_DIB_Sections/article.asp

(If this comment was disrespectful, please report it.)

 
4/13/2005 9:03:47 AMGareth CodeMan

first time ive voted i gave u 5 things this code works great needed this for a long time
(If this comment was disrespectful, please report it.)

 
4/13/2005 9:43:14 AMEvil_Bob

Good PE module :)
(If this comment was disrespectful, please report it.)

 
4/13/2005 7:55:36 PMSPY-3

it works with any bit type of icon i will give u 5 globes because it works without corrupting exe
(If this comment was disrespectful, please report it.)

 
4/15/2005 2:23:04 AMHeriberto Mantilla Santamarķa

I had tried to find something as this, finally find it, thank you.
(If this comment was disrespectful, please report it.)

 
4/17/2005 9:47:13 AM

thanks for the code i love it
(If this comment was disrespectful, please report it.)

 
4/28/2005 2:27:27 AM

I have a ver basic question.. sorry i am a novie.. so i have downloaded the code. Now how do i use it? Can i make a *.exe out of the .bas file? Or how do i compile and run the entire program?
again sorry for the trouble
(If this comment was disrespectful, please report it.)

 
4/28/2005 2:28:59 AM

Hi there..
I have downloaded your code. Now how do i compile it to make a program with *.exe in it and then be able to use it? can you please explain as i am a noive at these things..

Thanks
(If this comment was disrespectful, please report it.)

 
6/13/2005 6:51:33 AM

well a bit late but still.

if you want to compile then you can click
File>Make ????.exe
???? is that it will be any word just look for the word Make in the file menu and then select an location (Folder) to save the exe and walla.

and to use it, in the first box select a .exe and in the second select a .ico file after that simply click Change and the ok and walla it's done.

Once again awsome code m8.
(If this comment was disrespectful, please report it.)

 
7/13/2006 11:47:35 PMkilll

1.not support ico file larger than 16*16
2.can't change the caption ico

anyway ,it's great!

hope you can make it better
(If this comment was disrespectful, please report it.)

 
8/17/2006 3:58:38 AMcdrcools

Thanx alot ive been looking for this for years 5* from me, good job
(If this comment was disrespectful, please report it.)

 
2/15/2007 3:01:27 AMpietro ing. cecchi

nice presentation of matter and very useful code...:)
5 from me
(If this comment was disrespectful, please report it.)

 
7/25/2007 3:00:16 AMmamali

hey man that was great!
thank u
(If this comment was disrespectful, please report it.)

 
7/1/2008 1:16:37 AMRuturaaj

Hi! This works great on WinXP, but did not work for me on Vista Ultimate. Will you please take a look at it? Or does it need any system configuration tweak so then Vista "may" allow the PE information change? Please let me know your findings on this. (Email: mailme_friends@yahoo.com)
(If this comment was disrespectful, please report it.)

 
12/5/2011 5:44:10 PMDavid Appleford

This program CAN corrupt your PE files. It replaces every format of icon image in the PE file with the first format found in the icon file. If the replaced data is smaller than the replacement data, whatever follows the icon resource in the PE file will be overwritten. You can check out the resources in the PE file before and after replacing the icons using Colin Wilson's XN Resource Editor from http://www.wilsonc.demon.co.uk/d10resourceeditor.htm
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.