From d544a5dc5f75b2aa5158a232f731e35cae0c50e4 Mon Sep 17 00:00:00 2001 From: srazi Date: Thu, 23 Mar 2017 16:27:22 +0430 Subject: [PATCH] Windows: Don't run QZ as administrator after installation - Closes #2146 --- appveyor.yml | 4 ++++ windows/installer.nsi | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1014da6c9..bd3da5d1c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -69,6 +69,8 @@ after_build: appveyor DownloadFile "http://nsis.sourceforge.net/mediawiki/images/4/47/Registry.zip" ) else (echo "Use cached Registry.zip") - IF NOT EXIST "AppAssocReg-0.4.zip" ( appveyor DownloadFile "http://nsis.sourceforge.net/mediawiki/images/d/d4/AppAssocReg-0.4.zip" ) else (echo "Use cached AppAssocReg-0.4.zip") + - IF NOT EXIST "StdUtils.2016-05-14.r2.zip" ( + appveyor DownloadFile "http://github.com/lordmulder/stdutils/releases/download/1.10/StdUtils.2016-05-14.r2.zip" ) else (echo "Use cached StdUtils.2016-05-14.r2.zip") - IF NOT EXIST "master.tar.gz" ( appveyor DownloadFile "http://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+archive/master.tar.gz" ) else (echo "Use cached master.tar.gz") - mkdir ..\wininstall @@ -80,8 +82,10 @@ after_build: - 7z x "..\dependencies\KillProcDll&FindProcDll.zip" - 7z x ..\dependencies\Registry.zip - 7z x ..\dependencies\AppAssocReg-0.4.zip + - 7z x ..\dependencies\StdUtils.2016-05-14.r2.zip - copy Desktop\Plugin\*.dll .\ - copy Plugins\Unicode\*.dll .\ + - copy Include\*.nsh %QZ_DIR%\windows # prepare icu - 7z x "..\dependencies\%ICU_DIR_NAME%.zip" # prepare qtwebengine_dictionaries diff --git a/windows/installer.nsi b/windows/installer.nsi index 40a4e7916..338a92d52 100644 --- a/windows/installer.nsi +++ b/windows/installer.nsi @@ -39,6 +39,7 @@ !addplugindir "wininstall\" +!include "StdUtils.nsh" !include "FileFunc.nsh" !include "wininstall\AllAssociation.nsh" SetCompressor /SOLID /FINAL lzma @@ -63,7 +64,8 @@ SetCompressor /SOLID /FINAL lzma !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES -!define MUI_FINISHPAGE_RUN "$INSTDIR\qupzilla.exe" +!define MUI_FINISHPAGE_RUN +!define MUI_FINISHPAGE_RUN_FUNCTION "RunQupZillaAsUser" !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_WELCOME @@ -461,3 +463,7 @@ Function RegisterCapabilities ${EndIf} !endif FunctionEnd + +Function RunQupZillaAsUser + ${StdUtils.ExecShellAsUser} $0 "$INSTDIR\qupzilla.exe" "open" "" +FunctionEnd