summaryrefslogtreecommitdiffstats
path: root/nsis
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-01 22:41:39 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-01 22:41:39 +0200
commit4a22897591dc8ff64560bef693af49f171faf557 (patch)
treea936b936655168c2dc0a0bea3aa3ca0e55f19c61 /nsis
parent3d0e7a956afb6f913466e96bd462eff0c92ad4c6 (diff)
patch 8.2.2822: MS-Windows: unnessarily loading libraries when unregisteringv8.2.2822
Problem: MS-Windows: unnessarily loading libraries when unregistering OLE. Solution: Also skip loading libraries when invoked with "-unregister". Run Vim for README.txt with user privileges.
Diffstat (limited to 'nsis')
-rw-r--r--nsis/README.txt3
-rw-r--r--nsis/gvim.nsi9
2 files changed, 10 insertions, 2 deletions
diff --git a/nsis/README.txt b/nsis/README.txt
index c0a184d6a3..0d01ec86db 100644
--- a/nsis/README.txt
+++ b/nsis/README.txt
@@ -66,6 +66,9 @@ To build the installable .exe:
Install NSIS if you didn't do that already.
Also install UPX, if you want a compressed file.
+Download and include the ShellExecAsUser.dll Unicode version which can be
+sourced from: https://nsis.sourceforge.io/ShellExecAsUser_plug-in
+
Unpack the images:
cd nsis
diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
index 498d98dc84..58ed85c5eb 100644
--- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -119,9 +119,9 @@ RequestExecutionLevel highest
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_LICENSEPAGE_CHECKBOX
-!define MUI_FINISHPAGE_RUN "$0\gvim.exe"
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
-!define MUI_FINISHPAGE_RUN_PARAMETERS "-R $\"$0\README.txt$\""
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
@@ -300,6 +300,11 @@ Function CheckOldVim
Exch $0 # put $0 on top of stack, restore $0 to original value
FunctionEnd
+Function LaunchApplication
+ SetOutPath $0
+ ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" "-R $"$0\README.txt$""
+FunctionEnd
+
##########################################################
Section "$(str_section_old_ver)" id_section_old_ver
SectionIn 1 2 3 RO