Archive: Creating shortcuts


Creating shortcuts
I use the bellow code to extract files and create shortcuts.
The files are successfully copied but not shorcut is createed during the setup. What's wrong?


Section "MainSection" SEC01
SetShellVarContext all
SetOutPath "$INSTDIR\lib"
CreateDirectory "$INSTDIR"
CreateDirectory "$INSTDIR\lib"
File "lib\swing-layout-1.0.jar"
SetOutPath "$INSTDIR"
File "colors.jar"
File "README.TXT"
CreateShortCut "$SMPROGRAMS\ColorPicker\ColorPicker.lnk" "java -jar $INSTDIR\colors.jar"
SectionEnd

first createdirectory "$SMPROGRAMS\your dir" and then createshortcut :-)