mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
copy uninstaller to temp directory for correct naming
This commit is contained in:
parent
4e03a06ff9
commit
c002332f9c
1 changed files with 13 additions and 0 deletions
|
@ -932,6 +932,19 @@ FunctionEnd
|
||||||
; determine admin versus local install
|
; determine admin versus local install
|
||||||
Function un.onInit
|
Function un.onInit
|
||||||
|
|
||||||
|
; In order for the uninstaller to be able to remove itself, we have to do some trickery here.
|
||||||
|
; If the $EXEPATH does not contain the $TEMP dir, this instance is not the copied one
|
||||||
|
; so we move it to the $TEMP dir and then execute the copied uninstaller.
|
||||||
|
|
||||||
|
${StrContains} $0 $TEMP $EXEPATH
|
||||||
|
|
||||||
|
${If} $0 == "notfound"
|
||||||
|
CopyFiles /SILENT $EXEPATH $TEMP\Uninstall.exe
|
||||||
|
ExecWait '"$Temp\Uninstall.exe" _?=$INSTDIR' $0
|
||||||
|
SetErrorLevel $0
|
||||||
|
Quit
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
; attempt to elevate the uninstaller to admin status
|
; attempt to elevate the uninstaller to admin status
|
||||||
uac_tryagain:
|
uac_tryagain:
|
||||||
!insertmacro UAC_RunElevated
|
!insertmacro UAC_RunElevated
|
||||||
|
|
Loading…
Reference in a new issue