How to embed image to a Windows shortcut?

54

To change a shortcut's icon:

  1. Right click the shortcut and click Properties.

  2. Click the Change Icon button.

  3. Select the icon by clicking Browse and navigating to the file that contains the icon. Windows can use icons that are embedded in .exe, .dll, and .ico files.

    enter image description here


In order for the shortcut to be moved to another system and for the icon to still work, you must place the source of the icon in the same location on the destination computer.

For instance, if I create a shortcut with an icon that is located at C:\IconFile, I must copy the icon to C:\IconFile on the other computer before copying the shortcut.

Share:
54

Related videos on Youtube

newtopython
Author by

newtopython

Updated on September 18, 2022

Comments

  • newtopython
    newtopython over 1 year

    Assuming that my csv file has the following dataset column 'postal' filled with thousands of 6 digit. [E.g. 423524, 643231, 467278].

    How do I return the first 2 digit of the dataset number and label it on a new column? For instance, in the new column, if the first 2 number is 42, label it as A.

    I realized that doing str matching may not be ideal. Will need some advice.

    When I tried coding it this way, it shows a ValueError.

    def postalcode (x): 
        result = []
        for i in x: 
            if 1 - 46 or 58:
                central_region
            elif 46 - 52:
                east_region
            elif 53 - 55 or 57 or 77 - 80 or 82:
                northeast_region
            elif 59 - 72:
                west_region
            elif 72 or 73 or 75 or 76:
                north_region
            else:
                break
        return result
    
    kindergarden['postal_code'] = postalcode(kindergarden['postal_code'])
    kindergarden.head()
    
  • DevLounge
    DevLounge about 3 years
    just curious, why are you using sets instead of lists/tuples ?
  • newtopython
    newtopython about 3 years
    Thank you! Appreciate this a lot and the effort to type it out
  • SUTerliakov
    SUTerliakov about 3 years
    @DevLounge, there was somewhere on SO discussion about that, but can't find it fast. I prefer using sets in such cases, because they have approx. O(1) average complexity for test 'elem in set', when lists or tuples have O(length) average complexity. It doesn't matter for 1,2 or 5 elems, but if we have some previously collected long sets, it can improve performance a little.