What you specify in the Icon elements gets incorporated in your .msi as a
binary at build time, so it should be something you have control over, not
attempting to use a system executable.

The warning message is described in the documentation for the Icon table,
where it states:

"Icon files that are associated with shortcuts must be in the EXE binary
format and must be named such that their extension matches the extension of
the target. The shortcut will not work if this rule is not followed. For
example, if a shortcut is to point to a resource having the key file
Red.bar, then the icon file must also have the extension .bar. Multiple
icons can be stuffed into the same icon file as long as all of the target
files have the same extension."

The Id attribute is used for the icon file's name when it is extracted onto
the system. So you should use something like:

<Icon Id="helpicon.chm" SourceFile="myhelpicon.dll" />

When they say the EXE binary format they actually mean a Portable Executable
file - a resource-only DLL is acceptable. It does not actually have to be
executable.

-- 
Mike Dimmick

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Weiss
Sent: 03 January 2008 00:06
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to create help file shortcut icon?

When we created help file shortcuts in the start menu using
InstallShield, we had to manually set the icon to
System32\WinHlp32.exe. If I try to do this with WiX, it complains that
the extension of icon 'xyz' for shortcut 'abc' does not match the
extension of the Key File for component 'foo.chm'.

How does one go about getting a nice help icon in the start menu?

My code looks more or less like this:

        <Component Id="APPHELP.chm"
Guid="{91CD65F1-FAA3-42FD-9E1A-DDED9FA65CAC}">
          <File Id="APPHELP.chm" Name="APPHELP.chm" KeyPath="yes"
Source="..\APPHELP.chm" />
          <RemoveFolder Id="NewShortcut1" Directory="newfolder1"
On="uninstall" />
          <Shortcut Id="NewShortcut1" Directory="newfolder1"
Name="Application Help" ShortName="APPHELP" Icon="helpicon"
IconIndex="1" Show="normal" Advertise="yes" />
        </Component>
...
    <Icon Id="helpicon" SourceFile="$(env.windir)\system32\winhlp32.exe" />




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to