Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSIS - Desktop Shortcut For All Users

Tags:

nsis

How can I create desktop shortcuts for all user while installing a package?

like image 745
vijay Avatar asked Sep 21 '11 14:09

vijay


2 Answers

NSIS supports several of the common/shared special folders:

SetShellVarContext all
CreateShortcut "$desktop\myapp.lnk" "$instdir\myapp.exe"

This code assumes you are elevated...

like image 69
Anders Avatar answered Nov 16 '22 17:11

Anders


With !include NTProfiles.nsh [1] you can create a shortcut in the folder "${ProfilePathAllUsers}\Desktop".

[1] - http://nsis.sourceforge.net/NT_Profile_Paths

like image 2
robert Avatar answered Nov 16 '22 19:11

robert