aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremyRand <biolizard89@gmail.com>2018-04-14 07:51:49 +0000
committerfanquake <fanquake@gmail.com>2018-04-26 23:43:54 +0800
commit0684cf9b5845e40ba1e1c22bf03cd4786aff398c (patch)
treeedd17b58be606ab56bafca20e1919071424f9712
parente802c2294718f1e1128f2736842595c3b84a2882 (diff)
downloadbitcoin-0684cf9b5845e40ba1e1c22bf03cd4786aff398c.tar.xz
Avoid launching as admin when NSIS installer ends.
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 commit 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. 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. GitHub-Pull: #12985 Rebased-From: 7d8a8cc
-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