0

In the file system area of my visual Studio 2015 setup project, I have created a shortcut that points to a .BAT file that has been added to the project in the application directory. I edited the properties for the shortcut and specified an Icon that is in the application directory as well.

When I build and run the install, the desktop shortcut has a default windows icon instead of the one I selected. If I check the properties, the button to select a new icon is disabled. That led me to the discussion here:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/b57f1d84-9b0c-4c29-b140-0555f92ffed8/target-field-disabled-in-shortcut-created-in-deployment-project?forum=vssetup

I ran the setup with the parameter to disable the advertised shortcuts and the button to select a new icon is now enabled and I can manually select the icon, however, on install, the default icon is still displayed.

If I go in to properties for the created icon and attempt to manually set the icon, I get the following message: "The file %SystemRoot%\Installer{D0981E95-0351-4CA4-9315372F337F244}_8FA4153355CE75C35E4132.exe contains no icons. Choose an icon from the list or specify a different file."

The icon I'm referencing is a 256x256 icon file.

Does anyone have any idea why I can't get the icon I select for the shortcut to "stick"?

  • Is the icon present in the installed directory? – Makubex Jun 06 '18 at 17:03
  • Maybe the same as this https://stackoverflow.com/questions/39784457/winform-app-name-shown-as-alphanumeric-on-startup-tab-in-task-manager-in-window/40408122#40408122 – PhilDW Jun 07 '18 at 22:30

1 Answers1

0

If you right click your setup project and select View File System you should see a list of folders on File system on Target Machine.

Select the User's Desktop folder and you should see a shortcut File. If you select the properties for that file F4 there is a property for Icon that you can set.

Zaider
  • 1,950
  • 1
  • 21
  • 31