none
how to change icon of exe file

    Question


  • hi,
         how can i change the icon of exe file setup.exe generated by installlshield using C++

    i want to pick th icon from *.ico file and want to update the setup.exe file generated by installshield


    Tuesday, October 09, 2007 9:22 AM

Answers

All replies

  • simply change the icon of IDR_MAINFRAME .That's all you have to do.

     

    Thanx

     

    Tuesday, October 09, 2007 11:22 AM

  • would you please describe it in detail actually i am new to this field so please help me how to change that
    it would be appriciated if you will provide the code snippet to me
    Thanks

    Tuesday, October 09, 2007 11:25 AM
  • Well, you need to goto resource view in VC++ editor, then find the current ICON (should be named IDR_MAINFRAME in case of MFC project) and either paste the ICON picture into it Or add new icon and name it IDR_MAINFRAME (ofcourse you will need to rename old IDR_MAINFRAME first).

    Tuesday, October 09, 2007 11:34 AM

  • Hi,
           mu dear my problem is different i want to change the icon programatically bcoz this setup.exe is going to be generated at run time so i want to write some  code snippet which wil take exe file path and icon file path as parameter and will change the icon

    Tuesday, October 09, 2007 11:37 AM
  • You will need to update the ICON resource into that executable using resource APIs such as FindResource, BeginUpdateResource, UpdateResource, , following link to a sample on MSDN will help,

     

    Using Resources

     

    Tuesday, October 09, 2007 11:44 AM
  • Maybe this article of mine can help. It explains how to locate the old icon inside the executable and then you can replace it with another one using UpdateResource.
    Saturday, November 02, 2013 9:35 AM