Elbie_GE
31st July 2007 08:40 UTC
Give a shortcut a special icon
Hello,
i have more than 4 shortscuts and every shortcut had to become a special icon.
As example:
1. Shortcut = abc.ico
2. Shortcut = 123.ico
3. Shortcut = def.ico
4. Shortcut = 456.ico
How can I do that? This icons are not in an .exe or somethings like that.
Thank you very much!
Best regards!
Yathosho
31st July 2007 08:48 UTC
it's all here
Elbie_GE
31st July 2007 09:26 UTC
Thank you, but now i have a new problem:
I have a droplist. If now a user selects an entry there, that-speaking a shortcut will provided. I tried with "var kfirmasc1", which does not function however. The shortcuts are provided, however not with the special ICON.
With the selection I inserted now the following:
StrCpy $kfirmasc1 "C:\DIRTOICON\KUBXP_BP.ICO"
And i create the Shortcut with:
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\NAME ($kfirma1_name).lnk" "$OUTDIR\PROGRAMM\k.exe" "$kfirma1,$kfirmasc1"
But it dont works. After that I tried:
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\NAME ($kfirma1_name).lnk" "$OUTDIR\DIR\k.exe" [$kfirma1[$kfirmasc1]]
It also dont works.
(The italic is changed for this Thread!)
How can I do that? I search for solutions, but i dont find one.
Thank you!!
Red Wine
31st July 2007 12:23 UTC
You should include those extra icons and extract them e.g in $INSTDIR, then use them as described in documentation.
Elbie_GE
31st July 2007 13:57 UTC
Okay, thanks.
But what is now right, when "$kfirmasc1" = "$INSTDIR\k.exe" 2
That
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\NAME ($kfirma1_name).lnk" "$OUTDIR\PROGRAMM\k.exe" "$kfirma1,$kfirmasc1"
or
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\NAME ($kfirma1_name).lnk" "$OUTDIR\DIR\k.exe" [$kfirma1[$kfirmasc1]]
or
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\NAME ($kfirma1_name).lnk" "$OUTDIR\DIR\k.exe" "$kfirma1" "$kfirmasc1"
Sorry, i dont know. The documentation is not clear for me.
Thanks
Afrow UK
31st July 2007 14:41 UTC
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\NAME ($kfirma1_name).lnk" "$OUTDIR\DIR\k.exe" "parameters" "icon_path" "icon_index"
Pretty straight forward really.
If you don't have any parameters then use "" for it but you can't just miss it out.
Stu
Elbie_GE
1st August 2007 07:19 UTC
Thank you. After I included the icons to the setup and use your code, it functioned.
Its really hard to write it in my setup. More than 2000 lines... puh :D ... but okay... its workingtime :)
Thank you!
Afrow UK
1st August 2007 11:26 UTC
You should split it up into modules with descriptive file names and comments and then !include those in your main script.
Stu