We have recently removed the Advertised property to our installation since all the icon was standard ones (generic/blank) after installing. Now we use this kind of code:
<DirectoryRef Id="MyAppShortcutFolder">
<Component Id="MyAppShortcuts" DiskId="1" Guid="MyGuid">
<CreateFolder />
<RegistryKey Action="createAndRemoveOnUninstall" Root="HKCU" Key="$(var.MyAppRegKey)\Shortcuts">
<RegistryValue Name="ClientShortcuts" Value="yes" Type="string" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="MyAppShortcut" Directory="MyAppShortcutFolder"
Name="!(loc.ShortcutMyAppName)"
WorkingDirectory="MYAPPINSTALLDIR"
Target="[MYAPPINSTALLDIR]MyApp.exe"
Arguments='xxx"'
Icon="ARPPRODUCTICON.exe" />
<RemoveFolder Id='RmdirClientShortcutFolder' Directory='MyAppShortcutFolder' On='uninstall' />
</Component>
...
<Icon Id="ARPPRODUCTICON.exe" SourceFile="$(var.MyAppBasePath)\ICO\MyAppShortcut.ico" />
This produce a shortcut that points to an icon installed somewhere like "%systemroot%/A-GUID-Here/ARPPRODUCTICON.exe". This work fine as long as the shortcut is not copied to the desktop. If the user does this (very common actually) and then later installs a new version of our software (probably a "major" update) the old shortcut icon is uninstalled and a new GUID is created for the new shortcut icon. This makes the (old) desktop shortcut lose its icon.
What we really want is to point out the icon from the built in resource of the MyApp.exe. If this is not possible we would like the shortcut icon to reference a permanent location so that the old shortcut still works after an upgrade. We have maybe 10 shortcuts in the install. We could create a special resource DLL/EXE for just storing the ICON resource if necessary. But how to we make the short point out a "locally" installed file instead of %systemroot%?
We use Wix 3.5. We must support Windows XP/2003.
Regards Aldus