Avatar of vikasbapat
vikasbapat
 asked on

How to change Desktop and Add/Remove Programs icon of msi installer package in vs2008?

I have created a created a msi Installer for my desktop Application. I want to set my icon for my application for Desktop Shortcut and Add/REmove Programs. How can we do that? I checked the AddRemoveProgramIcon property, but it doesnt enable the "Ok" button even if I select the file, if the are not desktop Icons present in the Listbox that shows "Current Icon".
Is there any solutions?
Visual Basic.NETMicrosoft Development

Avatar of undefined
Last Comment
Miguel Oz

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Miguel Oz

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Corey Scheich

The icon I use has a 32x32 8bit size in it, it must be added to one of the target system folders and must be a *.ico.  When I follow those steps it shows in the current icons list and in the text at the top and the OK button is enabled.
vikasbapat

ASKER
I already have a shortcut on desktop. I want to assign my image to it. currently it  shows the default icon(image). How can we do that?
Miguel Oz

Alternative 1:
YOu need to change the icon of your application.
On your project right click Properties menu, and then onthe application tab define your icon under "Icon:" option.
Build again your project and then the setup.
This will be reflected in your shortcut.

Alternative 2:
 If you want a different shortcut fromyour current program, on setup project click on your shorcut and define it using the icon property.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
vikasbapat

ASKER
Yes I had tried the option:
On your project right click Properties menu, and then onthe application tab define your icon under "Icon:" option.

But this gives build error :
"Error    5    Error creating Win32 resources: Error reading icon 'D:\MyApp\Resources\Logo48x48.ico' -- The data is invalid.    
"
Miguel Oz

My answer is correct, your issue now is an invalid icon.
Try a different icon, your icon must be 16x16 or 32x32.