I have a control panel applet (*.cpl) that has an icon resource in it.
This doesn't work:
I get a relatively generic icon - the same as is displayed in e.g. Explorer for the .CPL file.
CreateShortcut "$SMPROGRAMS\test\test.lnk" "$PROGRAMFILES\test\test.cpl" "" "$PROGRAMFILES\test\test.cpl" "0" "" "" "Open the Test Control Panel"
However, I -can- change it to the correct icon by changing the shortcut file's properties. So I used the ShellLink plugin to figure out what the difference between my output and the modified version was, and the result of that is that THIS does work:
I realize it's probably best to use symbolic pathnames wherever I can (and will adjust the installer code to fit - though that's going to be annoying with any '$INSTDIR' type variables), but I wouldn't have imagined it to break an icon display given that they point to the exact same file, just using different means.
CreateShortcut "$SMPROGRAMS\test\test.lnk" "$PROGRAMFILES\test\test.cpl" "" "%ProgramFiles%\test\test.cpl" "0" "" "" "Open the Test Control Panel"
Any thoughts out there as to why this might be so?