aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-04-18 11:51:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-04-18 11:52:06 +0200
commit615f7c288414a89cd1dec1d67e0f84abe2fb4c6d (patch)
tree1511193a68020713e7f8eabc00f219dd5c499600 /share
parent0d12570a80378ed9a340043115e399a431351067 (diff)
parent7d8a8cc25ffd756e42d478908f14d9adf8eceed8 (diff)
downloadbitcoin-615f7c288414a89cd1dec1d67e0f84abe2fb4c6d.tar.xz
Merge #12985: Windows: Avoid launching as admin when NSIS installer ends.
7d8a8cc Avoid launching as admin when NSIS installer ends. (JeremyRand) Pull request description: The Bitcoin Core NSIS script runs with elevated privileges. Unfortunately, this means that it launches Bitcoin Core itself with elevated privileges when the user chooses to launch Bitcoin Core at the end of the installation procedure. This PR works around the issue by having `explorer.exe` launch Bitcoin Core. Seems to be a similar approach to what http://nsis.sourceforge.net/ShellExecAsUser_plug-in does, but without a plugin. I've tested this with Sysinternals Process Explorer on Windows 10 32-bit. I wouldn't expect any differences in behavior on other Windows releases, but if anyone would like to test on other Windows releases, feel free. h/t to "UK" at https://mdb-blog.blogspot.se/2013/01/nsis-lunch-program-as-user-from-uac.html?showComment=1410158039989#c2463780017054126736 for the sample code. Fixes #7990. Tree-SHA512: f40d6b6e5bb72952dcfbf223b68bfeb9a03bd5638f41b1700f4651f6452ce3fe7468129f6652c4f546210a5fd2521b2574c4b6068c5aea01ed2d719a8a838cd8
Diffstat (limited to 'share')
-rw-r--r--share/setup.nsi.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/setup.nsi.in b/share/setup.nsi.in
index dd42085a27..9fee9b42e0 100644
--- a/share/setup.nsi.in
+++ b/share/setup.nsi.in
@@ -20,7 +20,8 @@ SetCompressor /SOLID lzma
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "@PACKAGE_NAME@"
-!define MUI_FINISHPAGE_RUN $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
+!define MUI_FINISHPAGE_RUN "$WINDIR\explorer.exe"
+!define MUI_FINISHPAGE_RUN_PARAMETERS $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-wizard.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE