Browse Source

Install and uninstall shortcuts in all-users context

Closes gh-18

See http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista
Thomas Kluyver 11 years ago
parent
commit
b8c28a5279
1 changed files with 4 additions and 0 deletions
  1. 4 0
      nsist/template.nsi

+ 4 - 0
nsist/template.nsi

@@ -3,6 +3,8 @@
  
 SetCompressor lzma
 
+RequestExecutionLevel admin
+
 ; Modern UI installer stuff 
 !include "MUI2.nsh"
 !define MUI_ABORTWARNING
@@ -38,6 +40,7 @@ SectionEnd
 
 Section "!${PRODUCT_NAME}" sec_app
   SectionIn RO
+  SetShellVarContext all
   File ${PRODUCT_ICON}
   SetOutPath "$INSTDIR\pkgs"
   File /r "pkgs\*.*"
@@ -65,6 +68,7 @@ Section "!${PRODUCT_NAME}" sec_app
 SectionEnd
 
 Section "Uninstall"
+  SetShellVarContext all
   Delete $INSTDIR\uninstall.exe
   Delete "$INSTDIR\${PRODUCT_ICON}"
   RMDir /r "$INSTDIR\pkgs"