mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 14:53:01 +02:00
request admin elevation for uninstaller as well
This commit is contained in:
parent
75a8ab56bc
commit
265879cacf
1 changed files with 11 additions and 7 deletions
|
@ -31,10 +31,14 @@
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;General
|
;General
|
||||||
|
|
||||||
|
; Require administrator access
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
!ifdef INNER
|
!ifdef INNER
|
||||||
!echo "Inner invocation" ; just to see what's going on
|
!echo "Inner invocation" ; just to see what's going on
|
||||||
OutFile "$%TEMP%\tempinstaller.exe" ; not really important where this is
|
OutFile "$%TEMP%\tempinstaller.exe" ; not really important where this is
|
||||||
SetCompress off ; for speed
|
SetCompress off ; for speed
|
||||||
|
|
||||||
!else
|
!else
|
||||||
!echo "Outer invocation"
|
!echo "Outer invocation"
|
||||||
|
|
||||||
|
@ -42,7 +46,7 @@
|
||||||
; it is invoked, will just write the uninstaller to some location, and then exit.
|
; it is invoked, will just write the uninstaller to some location, and then exit.
|
||||||
; Be sure to substitute the name of this script here.
|
; Be sure to substitute the name of this script here.
|
||||||
|
|
||||||
!system "set __COMPAT_LAYER=RunAsInvoker && $\"${NSISDIR}\makensis$\" /DINNER project.nsi" = 0
|
!system "$\"${NSISDIR}\makensis$\" /DINNER project.nsi" = 0
|
||||||
|
|
||||||
; Require administrator access
|
; Require administrator access
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
|
@ -52,6 +56,12 @@
|
||||||
|
|
||||||
!system "$%TEMP%\tempinstaller.exe" = 2
|
!system "$%TEMP%\tempinstaller.exe" = 2
|
||||||
|
|
||||||
|
; The Inner invocation has written an uninstaller binary for us.
|
||||||
|
; We need to sign it if it's a production or PR build.
|
||||||
|
!if @PRODUCTION_BUILD@ == 1
|
||||||
|
!system '"@SIGNTOOL_EXECUTABLE@" sign /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://tsa.starfieldtech.com /td SHA256 $%TEMP%\uninstaller.exe' = 0
|
||||||
|
!endif
|
||||||
|
|
||||||
; Good. Now we can carry on writing the real installer.
|
; Good. Now we can carry on writing the real installer.
|
||||||
|
|
||||||
;Name and file
|
;Name and file
|
||||||
|
@ -1096,12 +1106,6 @@ Function .onInit
|
||||||
|
|
||||||
WriteUninstaller "$%TEMP%\uninstaller.exe"
|
WriteUninstaller "$%TEMP%\uninstaller.exe"
|
||||||
|
|
||||||
; We've written the uninstaller binary.
|
|
||||||
; We need to sign it if it's a production or PR build.
|
|
||||||
!if @PRODUCTION_BUILD@ == 1
|
|
||||||
!system '"@SIGNTOOL_EXECUTABLE@" sign /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://tsa.starfieldtech.com /td SHA256 $%TEMP%\uninstaller.exe' = 0
|
|
||||||
!endif
|
|
||||||
|
|
||||||
; just bail out quickly when running the "inner" installer
|
; just bail out quickly when running the "inner" installer
|
||||||
Quit
|
Quit
|
||||||
!endif
|
!endif
|
||||||
|
|
Loading…
Reference in a new issue