Put Start shortcuts in allusers profile instead of currentuser

The default shell context in NSIS is for the current user. This causes $SMPROGRAMS to put the link in the current user's profile. Other users on the system get no start menu link. This is causing me trouble because I'm trying to deploy Meshlab in a school and by default only the user that installs the application gets the Start Menu shortcuts.

Docs for SetShellVarContext at https://nsis.sourceforge.io/Docs/Chapter4.html
This commit is contained in:
KeenRivals 2019-10-30 14:26:06 -04:00 committed by GitHub
parent 17d380b1f9
commit dbba61dab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,7 @@ Section "MainSection" SEC01
File "${DISTRIB_FOLDER}\meshlab.exe"
File "${DISTRIB_FOLDER}\meshlabserver.exe"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\MeshLab"
CreateShortCut "$SMPROGRAMS\MeshLab\MeshLab.lnk" "$INSTDIR\meshlab.exe"
CreateShortCut "$DESKTOP\MeshLab.lnk" "$INSTDIR\meshlab.exe"
@ -314,6 +315,7 @@ Section Uninstall
Delete "$INSTDIR\textures\*.jpg"
Delete "$INSTDIR\textures\*.tga"
SetShellVarContext all
Delete "$SMPROGRAMS\MeshLab\Uninstall.lnk"
Delete "$SMPROGRAMS\MeshLab\Website.lnk"
Delete "$DESKTOP\MeshLab.lnk"