Discussion:
[WiX-users] Creating a shortcut : using shell32 common icons ?
Sylvain Petreolle
2010-05-04 10:25:43 UTC
Permalink
Hello,

I managed to create a shortcut that has an icon located into the Windows
shell32 library.
However, the created package currently embeds the shell32 file instead
of linking to it.
My current definition of the shortcut looks like this, could someone
point me into the correct direction ?

Code:
<Shortcut Id="desktopFlashLuxinet10" Directory="DesktopFolder"
Name="FlashLuxinet Wix 1.0"
WorkingDirectory='INSTALLLOCATION'
Icon="FlashLuxinetIcon.exe" IconIndex="12" Advertise="yes" />
....
<Icon Id="FlashLuxinetIcon.exe"
Sourcefile="C:\WINDOWS\system32\shell32.dll" />
--
Best regards,
Sylvain Petreolle
Mhz Wireless
Alexander Shevchuk (Volt)
2010-05-04 17:26:21 UTC
Permalink
I don't think MSI supports that. See definition of the Icon table (http://msdn.microsoft.com/en-us/library/aa369210(v=VS.85).aspx)



-----Original Message-----
From: Sylvain Petreolle [mailto:***@mhzwireless.com]
Sent: Tuesday, May 04, 2010 3:26 AM
To: Wix-Users
Subject: [WiX-users] Creating a shortcut : using shell32 common icons ?

Hello,

I managed to create a shortcut that has an icon located into the Windows
shell32 library.
However, the created package currently embeds the shell32 file instead of linking to it.
My current definition of the shortcut looks like this, could someone point me into the correct direction ?

Code:
<Shortcut Id="desktopFlashLuxinet10" Directory="DesktopFolder"
Name="FlashLuxinet Wix 1.0"
WorkingDirectory='INSTALLLOCATION'
Icon="FlashLuxinetIcon.exe" IconIndex="12" Advertise="yes" /> ....
<Icon Id="FlashLuxinetIcon.exe"
Sourcefile="C:\WINDOWS\system32\shell32.dll" />

--
Best regards,
Sylvain Petreolle
Mhz Wireless


------------------------------------------------------------------------------
Sascha Beaumont
2010-05-10 06:35:34 UTC
Permalink
You need to manually extract the required icons. Your desired behavior
is to only embed the required icon, but WiX just provides a way to
declare Windows Installer packages and this behavior isn't the way
Windows Installer works due to how packages are handled when
advertised.

As specified in the documentation of the Icon table that Alex has linked to...
"... only the small icon files to the user's machine when advertising
the resource. A developer of an installation package therefore needs
to author separate files containing only the icons. These icon files
are then stored as binary data in the Icon table."

Before extracting and redistributing an Microsoft icon, you might want
to check if this has any legal implications/issues.

Cheers,
Sascha


On Wed, May 5, 2010 at 3:26 AM, Alexander Shevchuk (Volt)
I don't think MSI supports that.  See definition of the Icon table (http://msdn.microsoft.com/en-us/library/aa369210(v=VS.85).aspx)
-----Original Message-----
Sent: Tuesday, May 04, 2010 3:26 AM
To: Wix-Users
Subject: [WiX-users] Creating a shortcut : using shell32 common icons ?
Hello,
I managed to create a shortcut that has an icon located into the Windows
shell32 library.
However, the created package currently embeds the shell32 file instead of linking to it.
My current definition of the shortcut looks like this, could someone point me into the correct direction ?
<Shortcut Id="desktopFlashLuxinet10" Directory="DesktopFolder"
Name="FlashLuxinet Wix 1.0"
                WorkingDirectory='INSTALLLOCATION'
Icon="FlashLuxinetIcon.exe" IconIndex="12"  Advertise="yes"  /> ....
<Icon Id="FlashLuxinetIcon.exe"
Sourcefile="C:\WINDOWS\system32\shell32.dll" />
--
Best regards,
Sylvain Petreolle
Mhz Wireless
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
KF
2012-04-03 11:55:10 UTC
Permalink
This is bad news. I should be able to reference say icon 167 from Shell32.dll
without having to include the dll itself(for sure illegal) or extracted icon
files (maybe illegal) in the installation package.
If you copy-paste the .lnk files to another machine, they automatically find
the referenced icons form shell32.dll, so why not support this when creating
shortcuts with MSI?

Possible legal issues could be avoided by creating the lnk file beforehand,
and including it as a normal file in the installation. This of course
defeats the whole purpose of MSI powered shortcuts and the whole dynamic
generation of them is also gone down the drain ...

--
View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Creating-a-shortcut-using-shell32-common-icons-tp5002673p7432661.html
Sent from the wix-users mailing list archive at Nabble.com.

Loading...