From 9972e2b0961d758ff071d2166daadb6d667359af Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 13 Jan 2016 12:16:40 -0800 Subject: [PATCH] attempt to use RunAsInvoker for inner/outer uninstaller --- cmake/templates/NSIS.template.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 777d98c71c..155d10115d 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -38,6 +38,9 @@ !else !echo "Outer invocation" + ; make sure that makensis itself is not run elevated + !system "set __COMPAT_LAYER=RunAsInvoker&makensis ..." + ; Call makensis again, defining INNER. This writes an installer for us which, when ; it is invoked, will just write the uninstaller to some location, and then exit. ; Be sure to substitute the name of this script here. @@ -55,12 +58,7 @@ ; 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 - ExecWait '"@SIGNTOOL_EXECUTABLE@" sign /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://tsa.starfieldtech.com /td SHA256 $%TEMP%\uninstaller.exe' $0 - - !if $0 != 0 - DetailPrint "Failed to sign uninstaller. Will not continue generation of installer." - Quit - !endif + !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.