Restore UAC elevation in the uninstaller.
parent
764fb0f07f
commit
1fb3124661
|
@ -5124,6 +5124,9 @@
|
||||||
|
|
||||||
${GetParameters} $R8
|
${GetParameters} $R8
|
||||||
|
|
||||||
|
; Require elevation if the user can elevate
|
||||||
|
${ElevateUAC}
|
||||||
|
|
||||||
${If} $R8 != ""
|
${If} $R8 != ""
|
||||||
; Default install type
|
; Default install type
|
||||||
StrCpy $InstallType ${INSTALLTYPE_BASIC}
|
StrCpy $InstallType ${INSTALLTYPE_BASIC}
|
||||||
|
@ -5170,14 +5173,6 @@
|
||||||
; unable to write to a file in the installation directory.
|
; unable to write to a file in the installation directory.
|
||||||
ClearErrors
|
ClearErrors
|
||||||
${If} ${FileExists} "$INSTDIR"
|
${If} ${FileExists} "$INSTDIR"
|
||||||
GetTempFileName $R6 "$INSTDIR"
|
|
||||||
FileOpen $R5 "$R6" w
|
|
||||||
FileWrite $R5 "Write Access Test"
|
|
||||||
FileClose $R5
|
|
||||||
Delete $R6
|
|
||||||
${If} ${Errors}
|
|
||||||
; Attempt to elevate and then try again.
|
|
||||||
${ElevateUAC}
|
|
||||||
GetTempFileName $R6 "$INSTDIR"
|
GetTempFileName $R6 "$INSTDIR"
|
||||||
FileOpen $R5 "$R6" w
|
FileOpen $R5 "$R6" w
|
||||||
FileWrite $R5 "Write Access Test"
|
FileWrite $R5 "Write Access Test"
|
||||||
|
@ -5187,19 +5182,13 @@
|
||||||
; Nothing initialized so no need to call OnEndCommon
|
; Nothing initialized so no need to call OnEndCommon
|
||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
|
||||||
${Else}
|
${Else}
|
||||||
CreateDirectory "$INSTDIR"
|
|
||||||
${If} ${Errors}
|
|
||||||
; Attempt to elevate and then try again.
|
|
||||||
${ElevateUAC}
|
|
||||||
CreateDirectory "$INSTDIR"
|
CreateDirectory "$INSTDIR"
|
||||||
${If} ${Errors}
|
${If} ${Errors}
|
||||||
; Nothing initialized so no need to call OnEndCommon
|
; Nothing initialized so no need to call OnEndCommon
|
||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
ReadINIStr $R8 $R7 "Install" "QuickLaunchShortcut"
|
ReadINIStr $R8 $R7 "Install" "QuickLaunchShortcut"
|
||||||
${If} $R8 == "false"
|
${If} $R8 == "false"
|
||||||
|
@ -5229,20 +5218,10 @@
|
||||||
${EndIf}
|
${EndIf}
|
||||||
!endif
|
!endif
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${Else}
|
|
||||||
; If this isn't an INI install, we need to try to elevate now.
|
|
||||||
; We'll check the user's permission level later on to determine the
|
|
||||||
; default install path (which will be the real install path for /S).
|
|
||||||
; If an INI file is used, we try to elevate down that path when needed.
|
|
||||||
${ElevateUAC}
|
|
||||||
${EndUnless}
|
${EndUnless}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
ClearErrors
|
ClearErrors
|
||||||
|
|
||||||
${IfNot} ${Silent}
|
|
||||||
${ElevateUAC}
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
Pop $R5
|
Pop $R5
|
||||||
Pop $R6
|
Pop $R6
|
||||||
Pop $R7
|
Pop $R7
|
||||||
|
|
Loading…
Reference in New Issue