Hi Markus,

The Source (http://msdn.microsoft.com/en-us/library/aa369210) is saying:

"Icon files that are associated strictly with file name extensions or CLSIDs 
can have any extension, such as .ico. However, 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. "

So, to fix that:

<Icon Id="MyIcon.exe" SourceFile="<pointer to exe file>"/>
<Shortcut Icon="MyIcon.exe" ... />

Regards,
Alex




-----Original Message-----
From: Markus Karg [mailto:k...@quipsy.de] 
Sent: Thursday, April 08, 2010 4:34 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Shortcut is not using specified icon

I have a strange problem. Following the directions in the WiX manual, I added a 
ShortCut which is working well. Now I added a icon, but the shortcut is not 
using it - it still uses the icon of the EXE! The installation is per machine.

 

<Icon Id="my.ico" SourceFile="..\foo\my.ico" />

 

<Component Id="Shortcut" Guid="...">

    <RegistryValue Root="HKCU" Key="Software\X\[ProductName]"
Name="Shortcut" Value="" Type="string" KeyPath="yes" />

    <Shortcut Id="Menu" Directory="MenuDir" Name="!(loc.ShortcutName)"
WorkingDirectory="INSTALLDIR" Target="[INSTALLDIR]my.exe" Icon="my.ico"
Advertise="no" />

</Component>

 

Any ideas?

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval Try the new software tools for 
yourself. Speed compiling, find bugs proactively, and fine-tune applications 
for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to