Skip to content

Commit ef3ff5e

Browse files
committed
get rid of UAC trickery
1 parent 1e8cb25 commit ef3ff5e

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

nsis/devkitPro.nsi

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
1+
RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
22

33
; plugins required
44
; untgz - http://nsis.sourceforge.net/UnTGZ_plug-in
@@ -20,7 +20,7 @@ RequestExecutionLevel user /* RequestExecutionLevel REQUIRED! */
2020
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
2121
!define BUILD "49"
2222

23-
SetCompressor lzma
23+
SetCompressor /SOLID lzma
2424

2525
; MUI 1.67 compatible ------
2626
!include "UAC.nsh"
@@ -789,26 +789,26 @@ var mirrorINI
789789
;-----------------------------------------------------------------------------------------------------------------------
790790
Function .onInit
791791
;-----------------------------------------------------------------------------------------------------------------------
792-
uac_tryagain:
793-
!insertmacro UAC_RunElevated
794-
${Switch} $0
795-
${Case} 0
796-
${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
797-
${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
798-
${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
799-
MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "This installer requires admin privileges, try again" /SD IDNO IDYES uac_tryagain IDNO 0
800-
${EndIf}
801-
;fall-through and die
802-
${Case} 1223
803-
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "This installer requires admin privileges, aborting!"
804-
Quit
805-
${Case} 1062
806-
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Logon service not running, aborting!"
807-
Quit
808-
${Default}
809-
MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate , error $0"
810-
Quit
811-
${EndSwitch}
792+
;uac_tryagain:
793+
;!insertmacro UAC_RunElevated
794+
;${Switch} $0
795+
;${Case} 0
796+
; ${IfThen} $1 = 1 ${|} Quit ${|} ;we are the outer process, the inner process has done its work, we are done
797+
; ${IfThen} $3 <> 0 ${|} ${Break} ${|} ;we are admin, let the show go on
798+
; ${If} $1 = 3 ;RunAs completed successfully, but with a non-admin user
799+
; MessageBox mb_YesNo|mb_IconExclamation|mb_TopMost|mb_SetForeground "This installer requires admin privileges, try again" /SD IDNO IDYES uac_tryagain IDNO 0
800+
; ${EndIf}
801+
; ;fall-through and die
802+
;${Case} 1223
803+
; MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "This installer requires admin privileges, aborting!"
804+
; Quit
805+
;${Case} 1062
806+
; MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Logon service not running, aborting!"
807+
; Quit
808+
;${Default}
809+
; MessageBox mb_IconStop|mb_TopMost|mb_SetForeground "Unable to elevate , error $0"
810+
; Quit
811+
;${EndSwitch}
812812
; test existing ini file version
813813
; if lower than build then use built in ini
814814
ifFileExists $EXEDIR\devkitProUpdate.ini +1 extractINI

0 commit comments

Comments
 (0)