I found this post in the forum Shortcuts using the wrong icon, which is very similar to the issue I am having. But as that was 7 years ago, I thought I'd ask again in a new thread.
So we have 1 setup which is built twice, using Compiler variables to modify various UI and install elements for branding purposes, e.g.
Code: Select all
Comment: Create Shortcut
[compiler if Variable BRAND Equals BrandA]
Create Shortcut $SHORTCUTFOLDER$\BrandA AppA 8 to $TARGETDIR$\bin\appA.exe, do not highlight in Start Menu
[compiler else]
Create Shortcut $SHORTCUTFOLDER$\BrandB AppA 8 to $TARGETDIR$\bin\appA.exe, do not highlight in Start Menu
[compiler end]
Setup_BrandA.msi
- ork5cIcons5cBrandAAppA.ico0.ico
- ork5cIcons5cBrandAAppE.ico0.ico
- 5cws5cSrc5cArtwork5cIcons5c.ico
- ork5cIcons5cBrandBAppE.ico0.ico
Setup_BrandB.msi
- s5cSrc5cArtwork5cIcons5cBra.ico
- s5cSrc5cArtwork5cIcons5cBra.ico
The paths to the Icon files does contain a #COMPILER_VARIABLE#, but that doesn't seem to stop:
- The InstallAware build finding the icons.
- In the majority of cases, correctly populating the Icon name and binary, and Shortcut table in the MSI
At this point, if the compiler variable really is the problem, I'm going to have to add a "search and replace" to the build process on the MIA file to replace instances of #COMPILER_VARIABLE# with the full path and hope that doesn't corrupt anything along the way.
I've attached a demo job to demonstrate the problem. If you change the BRAND compiler variable in the project options from PReS to PlanetPress, then the icons go from not working as expected to being OK. Also included in the zip are the built setups.

