4

I'm adding a shortcut in the Start Menu to a documentation pdf. I am not specifying the Icon parameter. After installation, it is coming up with a blank white icon. I would like it to have the appropriate document Icon as would normally be provided by Windows (I have Adobe Reader installed). What do I need to do?

fredley
  • 32,953
  • 42
  • 145
  • 236

1 Answers1

5

This turns out to be one of those things that seems simple on the surface, but really isn't. It's probably too late to help OP, but maybe it can point someone else in the right direction.

The problem is because the shortcut is advertised (in the WiX code you have the attribute Advertise="Yes"). Because of that, Windows doesn't recognise it as a 'pdf' file and so does not display the correct icon. See this SO Question.

There are two ways around this:

  • Set the icon manually: I figure most of my users will be using Adobe Reader, so I just got a copy of the Adobe PDF icon and set my shortcut to use that. Obviously if they have a different program set as default then it will look odd - but personally, I still think it's better than the blank icon.

  • Set your shortcut to unadvertised: Either set Advertise="No" or remove the Advertise attribute altogether (the default is No). Unfortunately, this does cause warnings in Candle, which I don't understand, but according to this WiX Mailing List Post, it should fix the icon problem.

Community
  • 1
  • 1
Laura Huysamen
  • 398
  • 3
  • 9