?
Solved

How can I embed an icon onto a shortcut?

Posted on 2010-08-31
6
Medium Priority
?
5,953 Views
Last Modified: 2012-05-10
I have a shortcut that I created that opens up a composing email screen from the default mailing service. I changed the icon and put an image file on there but when I move the shortcut to another computer the image on the shortcut is gone. How can I embed the image to the shortcut so I don't have to keep selecting the image I customized?
0
Comment
Question by:btny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 20

Expert Comment

by:marsilies
ID: 33571420
A shortcut in Windows is a special file with a .lnk extension. This type of file does not support embedded icons.

If you want to move the shortcut and keep the icon, then you have to move the icon file that the shortcut looks for to generate it. You have to move the icon file to the same place on the destination drive it was on the original drive. For example, if the icon file was in C:\ICONS\ on the original drive, then you have to copy the file over to C:\ICONS\ on the destination drive.

Personally, I just use icons contained in files already included in windows. This file has a number of different icons:
%SystemRoot%\system32\SHELL32.dll
0
 
LVL 33

Expert Comment

by:PowerEdgeTech
ID: 33571545
You could place the image on a network share so it is available wherever.
0
 
LVL 13

Accepted Solution

by:
khairil earned 2000 total points
ID: 33571631
Hi,

Unfortunately you cannot do that, unless under 2 conditions.

To make things clear, over here I paste what is in LNK (shortcut file)

==================================================

L        À      FÛ@     !ÚK·¡EË!ÚK·¡EËÒQø¸¡EËÎÂ|                    ‚ € 2 ÎÂ| =Õ$  MYAPP.EXE  d   ï¾=Ó$=Ó$*   ôî    •               M y A p p . e x e      ‰            -   8   ]         6Œhˆ    C:\Users\  %                \\MYCOMPUTER\Users ME\Desktop\MyApp.exe  . \ M y A p p . e x e  C : \ U s e r s \ me \ D e s k t o p 8 C : \ P r o g r a m   F i l e s   ( x 8 6 ) \ I c o n f i l e s \ W o r k s\ L i b r a r y . e x e ×           Í   1SPS0ñ%·ïG¥ñ`Œžë¬I  

<truncted>                                                                                  
=================================================

This LNK file refer to MyApp.exe but the icon changes to refer to icon number one in %ProgramFiles% (x86)\Icon files\Works\Library.exe. This propeties bring alone with the LNK when you copy it to another computer. If the LNK does not found the icon it refer to IN CLIENT COMPUTER, then you will get default icon.

So what is the conditions:
1. Make sure the icon files that the shortcut refer to is in the client computer with exact directory.

So the first options is hard to do. you have to copy two thing then, the LNK file and the icon file. Second option is much more better.

2. Point LNK to icon file via URI instead of local path.  Instead of using C:\icon folder\myicon.ico, try using \\10.20.20.70\iconfiles\myicon.ico. Change the ip address of 10.20.20.70 to match yours and create a shared folder, over here it is "iconfiles", you can have your own.

However you have to make sure that the shared folder is available to everybody with, of course read only permission (you don't want someone came and delete your icon). And also make sure that your network guys is not blocking shared port 135 -139 and 445.

Below is the sample when you are using share icon location.

Instead of

C : \ P r o g r a m   F i l e s   ( x 8 6 ) \ I c o n f i l e s \ W o r k s\ L i b r a r y . e x e ×  

it becomes

 \ \ 1 0 . 2 0 .20 . 7 0 \  I c o n f i l e s \ W o r k s\ L i b r a r y . e x e ×  

=========================================

L        À      FÛ@     !ÚK·¡EË!ÚK·¡EËÒQø¸¡EËÎÂ|                    ‚ € 2 ÎÂ| =Õ$  MYAPP.EXE  d   ï¾=Ó$=Ó$*   ôî    •               M y A p p . e x e      ‰            -   8   ]         6Œhˆ    C:\Users\  %                \\MYCOMPUTER\Users ME\Desktop\MyApp.exe  . \ M y A p p . e x e  C : \ U s e r s \ me \ D e s k t o p 8 \ \ 1 0 . 2 0 .20 . 7 0 \  I c o n f i l e s \ W o r k s\ L i b r a r y . e x e ×           Í   1SPS0ñ%·ïG¥ñ`Œžë¬I  

<truncated>
=========================================

enjoy.

0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:btny
ID: 33589171
khairil, thanks for that info.

I have tried Option 2 and it seems to work fine on my PC but as soon as I move it to another PC the icon location changes. It looks to the default of %SystemRoot%.... rather then pointing to the server.

Also the extension of the shortcut is a .URL I don't know if that makes a big difference or any difference at all when trying to have the shortcut map to the icon on the server.
0
 

Author Comment

by:btny
ID: 33589466
I figured it out!

I had to place both the icon and the shortcut on the same server that way they would properly link.

If I configured the shortcut on my computer and pointed it to the server then moved that file it wouldn't work but having both files on the server allowed it to work perfectly!

Thanks for all your help!
0
 

Author Closing Comment

by:btny
ID: 33590334
Thank You for your help!
0

Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question