简体   繁体   中英

Adding Icon to Short cut in setup

I'm trying to get icons to show up on the Shortcuts i create in my set up application. I have two shortcuts one for the start menu and desktop. The icon shows up fine in the program files but then that's the direct output of the application. The other two are shortcuts. They are still showing the default shortcut icon.

I found this and it didn't work. When i do it there is no icon displayed. So i cant select OK

Setting correct icon for Shortcut in VS2010 Setup Project

Then i found this link

How to change windows Applicatoin's default icon in Setup Project

Right click on you windows application project, select properties. In the properties window, select the application tab. In the application tab, there is a radio button saying Icon and manifest. Select that and browse and select your custom icon for the application in the Icon drop down menu.

When i try and do that. i get an error:

Error   8   Error generating Win32 resource: Error reading icon 
'C:\Users\<me>\Documents\Visual Studio 2010\Projects\<solution>\<project>\
<mylogo>.ico' -- The data is invalid.   
C:\Users\<me>\Documents\Visual Studio 2010\Projects\<solution>\<project>\
obj\x86\Debug\<program>.exe <project>

Any help please would be greatly appreciated.

It means your ico is corrupt. Try converting or creating the ico with a different tool or website if you converted it online before

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM