Wix: How can I point `C:Windowshh.exe` as the source of the icon for my CHM-file shortcut?


I need to create the shortcut to my CHM-file. Its icon are to be gotten from the C:Windowshh.exe file. The Icon attribute requires an Id of component, but hh.exe is absent in my MSI because it always exists in the C:Windows directory. Therefore it will not work:

<Component Id="Help_default" Guid="{BE58A822-637E-4B58-B2AC-690BA9FDF833}">
  <File Name="ProxyTools.chm" KeyPath="yes">
    <Shortcut Id="ProxyTools.exe" Directory="ProgramMenuDir" 
              Name="ProxyTools (English)" 
              WorkingDirectory='INSTALLDIR' Advertise="yes" Icon="hh.exe" IconIndex="0"/>

Maybe I am to point somehow the hh.exe like the item of

<Directory Id="WindowsFolder"/>

How can I point C:Windowshh.exe as the source of the icon for my CHM-file shortcut?


I added hh.exe into my WiX project and added this:

<Icon Id="hh.exe" SourceFile="hh.exe"/>

Now shortcuts is right.





Windows Installer does not make this possible. To understand the exact capability set, you must examine the underlying tables. First the Shortcut table Icon column is “The external key to column one of the Icon table.” The Icon table contains a primary key (referred to by the shortcut table, among others) and a binary entry. The binary data is the icon data to use.

Since the actual icon data must be stored in the resulting .msi database, and there are no alternate ways to specify an icon, you cannot refer to an icon that may already exist on the system. You can copy the desired icon into a resource of the Icon table, but that’s as close as you can come with native Windows Installer functionality.


[], [], []

Facebook Comments

Website Comments

  1. wristbands with a message

    Thanks for ones marvelous posting! I really enjoyed reading it,
    you can be a grdeat author. I will always bookmark your blog and will often come back someday.

    I want to encourage that you continue your great job, have a nice day!

  2. personalized rubber bracelets

    Heey there I am so grateful I foujd your wweb site, I really found
    you by accident, while I was searching on Askjeeve for something else,
    Nonethelesss I am here now and would just like too
    say thank you for a marvelous post and a all round interesting blog (I also love the theme/design),
    I don?t have time too go through it all at thee moment but
    I have book-marked it and also added in your RSS feeds,
    so wen I hsve time I will bee back to read more,
    Please do keep uup the excellent jo.

Post a comment