[Xfce4-commits] <midori:master> nsis: Request admin rights when installing.

Christian Dywan noreply at xfce.org
Thu Apr 4 19:04:02 CEST 2013


Updating branch refs/heads/master
         to cb3fd5be2e1cca69b598a0c21386a3e3ead8df89 (commit)
       from a5442dd8557e0db8fce31e70ba64839cdd738201 (commit)

commit cb3fd5be2e1cca69b598a0c21386a3e3ead8df89
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Thu Apr 4 14:37:37 2013 +0200

    nsis: Request admin rights when installing.

 win32/makedist/midori.nsi |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/win32/makedist/midori.nsi b/win32/makedist/midori.nsi
index 4ba91de..a8d4715 100644
--- a/win32/makedist/midori.nsi
+++ b/win32/makedist/midori.nsi
@@ -15,7 +15,7 @@
 
 ; Do a Cyclic Redundancy Check to make sure the installer was not corrupted by the download
 CRCCheck force
-RequestExecutionLevel user ; set execution level for Windows Vista
+RequestExecutionLevel admin ; set execution level for Windows Vista
 
 ;;;;;;;;;;;;;;;;;;;
 ; helper defines  ;
@@ -523,10 +523,9 @@ Function .onInit
 	${if} $Answer == "yes"
 		SetShellVarContext all ; set that e.g. shortcuts will be created for all users
 	${else}
-		SetShellVarContext current
-		; TODO is this really what we want? $PROGRAMFILES is not much better because
-		; probably the unprivileged user can't write it anyways
-		StrCpy $INSTDIR "$PROFILE\$(^Name)"
+               MessageBox mb_iconstop "Administrator rights required - use the portable release if that's not possible"
+               SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
+               Quit
 	${endif}
 
 	; prevent running multiple instances of the installer


More information about the Xfce4-commits mailing list