Archive: Desktop/start menu entries


Desktop/start menu entries
How do I give users the option to put an icon into their desktop and/or an entry into their start menu?
(Just like Winamp)

Edit: Please post code also.

sirK


Use InstallOptions to provide some checkboxes.
Search the Forum for example codes. A lot has been posted in the past.
Or create new sections and allow the user to select the sections he/she wants: desktop icon, start-menu icon, quick launch icon...

Good luck,
-Hendri.


To add shortcuts use CreateShortCut (from the docs...). To get the the directory of the start menu use $SMPROGRAMS (also easily found in the docs...). To switch between current user and all users use SetShellVarContext (docs...).


So you're saying to look in the docs?

To be frank, I'm both new to NSIS coding, and lazy. My favourite way to learn is by example, so if someone wants to show me how to do it, I'll be most grateful.

sirK


Some examples are availble in the NSIS directory...
It is not that complicated...

CreateShortCut link.lnk target.file [parameters] [icon.file] [icon_index_number] [start_options] [keyboard_shortcut]

Guess where I took it from? :D

CreateShortCut "$SMPROGRAMS\My Prog\myprog.lnk" "$INSTDIR\myprog.exe"


Originally posted by kichik
Guess where I took it from? :D
Wild guess, the docs?

Thanks a load. I am now most grateful.

sirK