How can I create desktop shortcuts for all user while installing a package?
NSIS - Desktop Shortcut For All Users
Asked Answered
This usually means only the admin can delete your shortcut, uncool! –
Chromatography
NSIS supports several of the common/shared special folders:
SetShellVarContext all
CreateShortcut "$desktop\myapp.lnk" "$instdir\myapp.exe"
This code assumes you are elevated...
This works for me on Windows 10. However, it doesn't seem to do the trick for a similar shortcut in the 'start programs' folder (
$SMPROGRAMS
). –
Lotti In MUI2, you have to
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
to set $SMPROGRAMS. When you are done _END
–
Foreignborn With !include NTProfiles.nsh
[1] you can create a shortcut in the folder "${ProfilePathAllUsers}\Desktop"
.
Hi Robert.. Thanks for the solution.. but it seems to b not working in my package maker 1.1.. Is there any constraints bcoz of version.? I adden NTProfiles.nsh in Include Folder and given the path as u mentioned... Thanks.. –
Brewmaster
This code uses undocumented registry values! NSIS has native support for the shared desktop folder so this kind of thing is not required nor recommended! –
Chromatography
© 2022 - 2024 — McMap. All rights reserved.