NSIS - Desktop Shortcut For All Users

霸气de小男生 提交于 2019-12-10 14:51:48

问题


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


回答1:


NSIS supports several of the common/shared special folders:

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

This code assumes you are elevated...




回答2:


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

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



来源:https://stackoverflow.com/questions/7501193/nsis-desktop-shortcut-for-all-users

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!