aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/nsis/CMakeLists.txt
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2020-07-25 14:46:42 +0100
committerGraham Bloice <graham.bloice@trihedral.com>2020-07-25 17:52:01 +0000
commitac2883f5e8e0a461ba06733294738358eb527b8c (patch)
tree33286850a1e24f6954c54c1a84167e53821dd8f4 /packaging/nsis/CMakeLists.txt
parent4bea0e7c2ebf87c5f3ef8421475c7e31140fdfdc (diff)
NSIS uninstaller: ensure the uninstaller runs with elevated privileges
The uninstaller should run with elevated privileges to allow deletion of files from protected directories. Modifying the uninstall script to require elevation then causes the uninstaller_installer that creates the uninstaller to also require elevation which happens at build time so defeat that by setting the env var __COMPAT_LAYER to "RunAsInvoker" before calling the uninstaller_installer. Achieving this from CMake requires a script to call to set the env var and then calling the executable. Change-Id: I056931bc4f9b41877b8f31d765d49fee11b54e39 Reviewed-on: https://code.wireshark.org/review/37955 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'packaging/nsis/CMakeLists.txt')
-rw-r--r--packaging/nsis/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt
index 727c6e2f1b..5496580798 100644
--- a/packaging/nsis/CMakeLists.txt
+++ b/packaging/nsis/CMakeLists.txt
@@ -191,7 +191,7 @@ macro( ADD_NSIS_UNINSTALLER_TARGET )
${_nsis_source_dir}/common.nsh
COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS}
uninstall.nsi
- COMMAND ${DATAFILE_DIR}/uninstall_installer.exe
+ COMMAND ${POWERSHELL_COMMAND} "${_nsis_source_dir}/makeUninstall.ps1" ${DATAFILE_DIR}/uninstall_installer.exe
COMMAND ${CMAKE_COMMAND} -E remove ${DATAFILE_DIR}/uninstall_installer.exe
WORKING_DIRECTORY ${_nsis_source_dir}
)