Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3848264
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:40:35+00:00 2026-05-19T16:40:35+00:00

Is there a way to add a custom icon to an .exe file generated

  • 0

Is there a way to add a custom icon to an .exe file generated from IronPython using pyc.py or programmaticly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:40:35+00:00Added an answer on May 19, 2026 at 4:40 pm

    There appears to be several ways to accomplish this, however none are as easy as having a commandline switch like for C# code.

    • Generate the exe using pyc.py. Modify the generated exe with an
      icon editor

    • Modify pyc.py to add a call to
      DefineUnmanagedResource (insert at
      line 83, just before ab.save)

    ab.DefineUnmanagedResource(r”D:\tmp\app.res”)

    Now you have to convert your .ico file into a .res file using RC. From [The SharpDevelop Forums][1]

    Create a Resource file (.rc) containing the icons you want to embed as resources, for example:

    #define ICO_APP        128
    #define ICO_DVD        129
    #define ICO_SVR        130
    #define ICO_SIM        131
    
    ICO_APP  ICON "App.ico"
    ICO_DVD  ICON "dvd-database.ico"
    ICO_SVR  ICON "ScreenSaver.ico"
    ICO_SIM  ICON "SimpSvr.ico"
    

    Compile the .rc file into a .res file using Microsoft’s Resource Compiler Rc.exe, which is part of Microsoft’s Platform SDK. Note that the lowest icon ID number in the .rc file (e.g. 128 above) will automatically become the application’s icon.

    • Follow the steps outlined in this
      [C# question][2] which makes use of BeginUpdateResource(), UpdateResource() and EndUpdateResource() calls in kernel32.dll.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to add some custom font on a website without using
Is there any way to add custom attributes to properties in EF generated code?
Is there a way to add a custom column to DataTable jQuery plugin, such
I would like to know if there is any way to add custom behaviour
Is there an easy way to add a custom RFC822 header to a message
Is there a way to add a resource to a ResourceDictionary from code without
Is there any way to place a custom icon for each group item? Like
Is there any way to add custom field keys to the dropdown of the
Is there a way to add custom fields to the built in browser context
Is there a way to add custom attributes to @Page directive and also get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.